1

I have a large Vue application that is being bundled with Webpack. The bundle time is around 2 minutes, and I have not found a way to improve it much.

For development purposes, I am using webpack-dev-middleware and webpack-hot-middleware. I would like to find a way to avoid waiting the whole bundle time every time I start the development server - specially when the code has not changed at all.

Is it possible to cache old builds so that, is nothing has changed, webpack-dev-middleware reuses them instead of building the code all over again? Can you think of any other way of improving this situation?

  • Simplest solution? Use [vite](https://vitejs.dev/). Works with Vue2 and Vue3. – kissu Apr 05 '22 at 17:25
  • Thanks for the recommendation. It looks good and I will give it a try in the next project I start from scratch. In this case, however, I would love to find a solution within Webpack, because I have quite a complex Webpack configuration and migrating everything to Vite could take a good deal of work. – Franco Frizzo Apr 06 '22 at 14:35

0 Answers0