react-webpack-server-side-example icon indicating copy to clipboard operation
react-webpack-server-side-example copied to clipboard

webpack --watch works, would it be faster webpack-dev-middleware?

Open landabaso opened this issue 9 years ago • 0 comments

I'm interested in combining this example with webpack-dev-middleware or webpack-dev-server (if possible).

My experience is it would take less time to bundle the final files using webpack-dev-middleware thainstead of webpack --watch.

The issue here is how to require the generated page to use it with Express.

Right now it is simply required as: var page = require("./page.generated.js");

But this generated file is now in the Memory Filesystem.

Probably I should use something like:

middleware.fileSystem.readFileSync

Is that the right direction? Do you have any example, idea or advice?

Thanks

landabaso avatar Mar 07 '16 09:03 landabaso