Questions tagged [webpack-hmr]
343 questions
3
votes
2 answers
Can't get Webpack 2 HMR React to work
Currently I'm struggling to get HMR working in my Webpack 2 setup. I'll explain my entire setup so I hope this is enough for someone to understand what's happening.
The structure of my project:
config
dev.js
prod.js
dist
css
js
…

DavidWorldpeace
- 519
- 2
- 7
- 22
3
votes
0 answers
Angular2 + Webpack2 + Express + HMR + Lazy Loaded Modules
Has anyone ever gotten a lazy-loaded module to work using Webpack2 for a bundler? I feel like I'm going crazy.
I'm using Visual Studio Code to compile my TS files into JS files before bundling them with Webpack2.
I've tried following simple…

Evan Machusak
- 694
- 4
- 9
3
votes
4 answers
HMR for create-react-app with react-redux
HMR isn't enabled for apps init'ed with create-react-app. There is a blog post about how one can enable it here: http://chrisshepherd.me/posts/adding-hot-module-reloading-to-create-react-app
ReactDOM.render(
,
rootEl
);
if (module.hot)…

Mister Epic
- 16,295
- 13
- 76
- 147
3
votes
2 answers
Webpack HMR does not reload html
Minimalistic repository for problem testing
I have the simplest project structure now:
root
|-src
--|index.pug
--|--styles.css
--|--app.js
|-public
--|--img
Packages:
"devDependencies": {
"css-loader": "^0.26.1",
…

Maksim Nesterenko
- 5,661
- 11
- 57
- 91
3
votes
2 answers
Angular 2 : Thoughs about HMR and @ngrx/store
Before starting, this link can be useful : what is the purpose of HMR ?.
I do not have a deep experience in huge projects management / conception. I'm still to young to have a beautiful beard. So I am here, looking for advices.
the seed
I am looking…

Clément Flodrops
- 1,114
- 1
- 13
- 29
3
votes
1 answer
What Webpack's HMR can do which Browsersync is not able to do?
I use Browsersync for Automatic Page refresh for my HTML, CSS changes without reloading the whole page and it works. It also doesn't page to the top to apply the changes and keep the state of the element persistent too, for example, input text.
Is…

Jitendra Vyas
- 148,487
- 229
- 573
- 852
3
votes
1 answer
Moment.js guess timezone is temporarily loading incorrect timezone
Moment.js guess timezone is temporarily loading UTC then switching to the correct timezone.
I've narrowed it down to what seems to be that webpack is loading the bundle.js file first before moment.tz.guess() gets the correct timezone.
Look at the…

Alex Cory
- 10,635
- 10
- 52
- 62
3
votes
1 answer
Typescript and HMR not working
I have front-end app built with Typescript, ReactJS and Webpack.
I am trying to enabling HMR.
These are starting scripts
"build": "NODE_ENV=production $(npm bin)/webpack --watch",
"dev": "$(npm bin)/nodemon --exec \"$(npm bin)/ts-node\"…

Mino
- 635
- 10
- 28
3
votes
1 answer
Why both inline and hot flag required in webpack-dev-server to enable hot reloading
In every documentation or article I see to enable HMR with webpack-dev-server we need to use webpack-dev-server --hot --inline, Interestingly even if I omit hot flag and only keep inline in my code-base HMR still works. Is all the documentations are…

sapy
- 8,952
- 7
- 49
- 60
3
votes
0 answers
2nd pass builds get slower and slower with Webpack 2
I'm trying out webpack 2 with HMR and I encountered a strange problem.
After each modification, incremental update is finished very quickly and then the message Compilation needs an additional pass and will compile again. is displayed. After that…

Marko
- 5,437
- 4
- 28
- 47
3
votes
2 answers
webpack - hot module reload on the server
Webpack hot reloading (webpack-hot-middleware) works wonderfully for the client; it rebuilds and updates assets on the client whenever a file is changed. But for universal/isomorphic servers, where the server needs to prerender the HTML response,…

Synchronous
- 101
- 9
3
votes
1 answer
Webpack and Precss not reloading on @import file change
I am setting up a basic Webpack installation and want to have automatic browser reloading of preprocessed CSS in @imported files using PostCSS and the PreCSS plugin. At present if I modify and save an @imported file the browser does not refresh…

mummybot
- 2,668
- 2
- 28
- 31
3
votes
0 answers
Run webpack with HMR client on another system
I have a working webpack setup with hot module reload, that works great as long as I keep everything on local host.
But I'd like to have another computer running the client that also has hot module reload enabled.
Unfortunately when I try to do…

jssblck
- 529
- 5
- 20
3
votes
3 answers
Webpack hot module replacement (HMR) sourcemaps not updated / new code not visible in dev tools
I have set up HMR successfully, everything working, including proxying the backend site. The only issue remaining is, that I can't see the actual original code (ES2015) in the browser unless I do a full reload.
Did I miss something or is this not…

macmillancodes
- 63
- 7
3
votes
0 answers
Optimise Sass Compilation Using Webpack Hot Module Replacement
What factors effect compilation performance of Sass files when using Hot Module Replacement with Webpack?
I currently have a lot of Sass files, organised into multiple directories:
├── api
├── assets
│ └── fonts
├── config
├── const
├──…

Undistraction
- 42,754
- 56
- 195
- 331