jlongster / monkey-hot-loader Goto Github PK
View Code? Open in Web Editor NEWA webpack loader to hot reload JavaScript modules
A webpack loader to hot reload JavaScript modules
Changing js : 'node'
to js: 'node --debug-brk'
in
nodemon({
execMap: {
js: 'node'
},
script: path.join(__dirname, 'build/backend'),
ignore: ['*'],
watch: ['nothing/'],
ext: 'noop'
});
doesn't seem to start the debug capabilites (unable to connect via node-inspector & don't get debugger listening on port 5858
on command line).
Am I missing a step?
There is no mention anywhere of the license under which use of this component is granted.
Can you (@jlongster) just specify that?
Thanks for the contribution to the community and we're considering forking and enhancing this component but we would like to be sure about your terms of use :)
I'm trying to follow the instruction here
webpack.config.server.dev.babel.js
'''
entry: [
'webpack/hot/signal.js',
SERVER_ENTRY_POINT
],
// ...
plugins: [
new webpack.HotModuleReplacementPlugin()
]
'''
And I run this command
webpack --config webpack.config.server.dev.babel.js --watch
And seems like it is working
However, when I run this command
nodemon my-build/index.js -- watch
I got the following error ...
/node_modules/webpack/hot/signal.js:64
throw new Error("[HMR] Hot Module Replacement is disabled.");
^
Error: [HMR] Hot Module Replacement is disabled.
Error: [HMR] Hot Module Replacement is disabled.
at Object.<anonymous> (/Users/iroy2000/development/test/node_modules/webpack/hot/signal.js:64:8)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
How can I resolve that issue? Thanks for any help.
If I do not set
config.devtool = 'source-map';
then I got Module build failed: Error: Final loader didn't return a Buffer or String
message.
Commenting out
if(this.sourceMap === false) {
return this.callback(null, [source, appendText]);
}
in index.js
kinda fixes that.
I was playing around with webpack and hot module replacement this weekend, I saw that it's currently not possible to patch methods on existing objects (see milankinen/livereactload#50), and I was wondering if supporting method patching is something that's within the scope of monkey-hot-loader.
I see 3 steps towards getting most of this working, and perhaps monkey-hot-loader represents step one.
The steps I think are:
#become:
and similar things in CLOS)Hi,
First of all, thank you for the cool loader, nice job.
I've just tried to test it in a browser environment and got the following stackoverflow/recursion error:
Uncaught RangeError: Maximum call stack size exceeded
webpackHotUpdateCallback @ bundle.js:5
webpackHotUpdateCallback @ bundle.js:6
webpackHotUpdateCallback @ bundle.js:6
webpackHotUpdateCallback @ bundle.js:6
webpackHotUpdateCallback @ bundle.js:6
webpackHotUpdateCallback @ bundle.js:6
...
Doesn't look like it interrupts the hot module replacement, but happens every HMR iteration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.