JavaScriptServices icon indicating copy to clipboard operation
JavaScriptServices copied to clipboard

integrate with webpack dev server to speedup rebuilding time

Open marcinvalas opened this issue 10 years ago • 2 comments

I am trying to understand what I need to do to introduce webpack-dev-server to speed up my development process .
I see that prerendering uses webpack.config to rebuild app, but in my project it is taking to much time. Sometimes it takes more than 1 min. It looks like it is full rebuild, and I think doing it incrementally could be a reasonable step

What is the best approach to use webpack-dev-server? Have any of you similar issue?

marcinvalas avatar Nov 10 '16 14:11 marcinvalas

I see that prerendering uses webpack.config to rebuild app

If you're seeing asp-prerender-webpack-config in your code then your app was generated with an older version of the generator. The newer generator produces projects where the prerendering bundle is produced at build-time rather than at runtime, so is faster to start in production. You might want to try the newer generator.

I'll close this because the change you want is already implemented :)

SteveSandersonMS avatar Nov 10 '16 23:11 SteveSandersonMS

Still one thing is not clear for me. I would like to use webpack-dev-server incremental build feature. Is it avaliable out of the box in latest version of JavaScriptServices? Or should I run such a server myself and integrate it with 'server side prerendering' by providing url to it instead of static file asp-prerender-module="http://localhost:8080/ClientApp/dist/main-server" ?

marcinvalas avatar Nov 14 '16 21:11 marcinvalas