imperodesign / generator-impero

Impero's website skeleton generator, courtesy of Yeoman
Other
1 stars 1 forks source link

Webpack stuck continuously producing bundles #34

Open samhh opened 8 years ago

samhh commented 8 years ago

During dev mode, rarely Webpack will get stuck and keep producing bundles ad infinitum. Unsure as to why thus far.

samhh commented 8 years ago

Possibly related to Nodemon?

pvalentim commented 8 years ago

Probably, we need to add the src to the ignore paths in nodemon.

samhh commented 8 years ago

Did this fix it? Noticed it in a project:

nodemon app/index --ignore src/

@pvalentim

samhh commented 8 years ago

That appears to make it rarer, but it still happens (easy to replicate if you update a client and server JS quickly one after another). I'll add it for now but a better solution is necessary.

samhh commented 8 years ago

https://github.com/imperodesign/generator-impero/commit/56e010ecb66a6d0a0a461964812c3edd80112999

samhh commented 8 years ago

I was able to successfully separate the HMR code from the server into its own micro-server (similar to: https://gist.github.com/ezekielchentnik/ed0cabb09bf29e5b4a7a461a11b1c63d), however that still had problems such as the client losing connection to the HMR occasionally. It also increased code complexity.

samhh commented 8 years ago

Perhaps worth trying?: https://github.com/60frames/webpack-hot-server-middleware