Skip to content

Instantly share code, notes, and snippets.

@stickel
Created July 30, 2015 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stickel/06e33bea30817ec974b2 to your computer and use it in GitHub Desktop.
Save stickel/06e33bea30817ec974b2 to your computer and use it in GitHub Desktop.
webpack/hot/dev-server and webpack working in a node angular app
module.exports = {
entry: {
app: ['webpack/hot/dev-server', './app/app'], // => webpack-dev-server will work but webpack build won't
app: ['./app/app', 'webpack/hot/dev-server'], // => both webpack-dev-server AND webpack build will work
vendor: ['./app/vendor'],
components: ['./app/components/home']
}
};
@stickel
Copy link
Author

stickel commented Jul 30, 2015

Line 3 keeps returning an error that the angular.module cannot be found. Likely because of this error happening before app/app.js is loaded:

Uncaught Error: [HMR] Hot Module Replacement is disabled.

In line 4 the Hot Module Replacement error still happens, but it's after app/app.js has loaded and doesn't matter (at least on localhost).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment