reactjswebpackwebpack-hot-middleware

Webpack - Optimizing the compile time(with hot reloading)


We are using webpack-hot-middleware for our dev env.

The problem is that the compile has gotten up to 30secs with the code growth.

I am trying to implement the suggestions at: https://webpack.github.io/docs/build-performance.html.

So about the DYNAMIC LINKED LIBRARY I found a great tutorial: http://engineering.invisionapp.com/post/optimizing-webpack/

The problem is that all the tutorials about the DllPlugin are regarding a build and not with hot reloading.

Does anyone know how to implement this with the webpack-hot-middleware or any other hot-reloader.


Solution

  • At the end came out that the problem was that i was using devTool:source-map and I should have used source-map-eval which uses caching, this reduced the compile time to 2-3 seconds!

    So the dynamic DLL solutions is only applicable for build and is not needed for hot-reloading which re-compiles the delta's pretty fast