React-redux-universal-hot-example: hot-reloading is very slow

Created on 30 Jul 2015  路  20Comments  路  Source: erikras/react-redux-universal-hot-example

hi, I found that I had to wait for serval second to see the result after modifying a component.Can I turn webpack-dev-server lazy mode to true?It seems not working as I expected.

help wanted

All 20 comments

I'm not sure. It's pretty quick for me.

Anyone else seeing this?

[1] ==> 馃捇 Open http://localhost:3000 in a browser to view the app.
[0] Hash: 2122070791b0e8d6721d
[0] Version: webpack 1.10.5
[0] Time: 8813ms
[0] Asset Size Chunks Chunk Names
[0] c29770d03d2e95e3ea5899d57c6cfeab.jpg 92.2 kB [emitted]
[0] main-2122070791b0e8d6721d.js 3.13 MB 0 [emitted] main
[1] [piping] File src/views/Home.js has changed, reloading.
[0] Hash: 584714ccc195ea5d52f8
[0] Version: webpack 1.10.5
[0] Time: 3859ms
[0] Asset Size Chunks Chunk Names
[0] c29770d03d2e95e3ea5899d57c6cfeab.jpg 92.2 kB [emitted]
[0] main-584714ccc195ea5d52f8.js 3.13 MB 0 [emitted] main
[0] 0.2122070791b0e8d6721d.hot-update.js 21.3 kB 0 [emitted] main
[0] 2122070791b0e8d6721d.hot-update.json 36 bytes [emitted]

When I turn quiet to false, It seems that When a component is modified.All the source are re-compile again and it's obviously only one file need to be compiled.Can this to be fixed?

You are correct, that if you turn noInfo: false, it certainly looks like it's building every file every time.

I'm far from a webpack expert, so I'll leave this open in case someone comes along with more insights.

+1 very slow update, more 5 sec

new webpack.WatchIgnorePlugin([/\.json$/]),

this line creates problems

Can you elaborate, @b2whats? What does removing it change?

Changing this:

new webpack.WatchIgnorePlugin([/\.json$/])

to:

new webpack.IgnorePlugin([/\.json$/])

seems to help bring the build time back down to about 300ms.

However - it does seem to crash to watcher at random times...so not sure if this is a viable solution.

Seems to only crash sometimes when noInfo is true and the output is too long. Keeping it dev server quiet with quiet: true, noInfo: true seems to do the trick.

Nice work, @subpopular.

whoops, this trick doesn't make any senses. Turn quiet: false, noInfo: false, all files are still compiled every time.

WatchIgnorePlugin breaks the webpack cache - even though it shows all the files - webpack is using the cache correctly with this fix, so not everything is actually being rebuilt everytime.

For me, this sped up the build time from 3000ms to 300ms.

Already update to newest code. "npm run dev" still keep 3000ms, is there any wrong ?

Flipping those settings to verbose showed me that it looked at every file, but only compiled the one that changed.

You are correct.Thank you very much.

Already updated to newest code. But hot reload is taking around 4494ms with 'npm run dev'. Am I missing something here ?

Same here

Same for me

any luck with this anyone?

same problem here, no solution so far?

Turn on caching in dev too, this way it will use the cached file in hot reload. Just cache:true

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jorgehmv picture jorgehmv  路  3Comments

bdsabian picture bdsabian  路  6Comments

korczis picture korczis  路  3Comments

skywickenden picture skywickenden  路  4Comments

donpinkus picture donpinkus  路  5Comments