wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.64k stars 1.18k forks source link

Consider replacing Webpack with Vite #640

Closed michelwaechter closed 1 year ago

michelwaechter commented 2 years ago

Is your feature request related to a problem? Please describe. Nearly every developers knows about the issues with webpack and its compiling methods. It's also a bit slow and hot reload doesn't work as brilliant as it could be. Please consider to replace webpack with vite.

Describe the solution you'd like Please replace webpack with vite as fast as possible. Performance is much better. Compiling much faster and less bugs.

Describe alternatives you've considered Here is a link to the normal vite way of creating an application. https://vitejs.dev/guide/#scaffolding-your-first-vite-project

With yarn create vite my-vue-app --template react or yarn create vite my-vue-app --template react-ts

You can replace the normal CRA process. There are also templates for vueJS, svelte and many other languages.

Additional context WASP + VITE = LOVE

Martinsos commented 2 years ago

Haha, love your Wasp + Vite = Love :D!

Btw, since mentioning alternative build tools, I heard about parcel.js (https://parceljs.org/) and that looked very interesting, since it seemed to be very declarative and low on config -> any thoughts about parcel as a build solution?

michelwaechter commented 2 years ago

Personally i've never tried. But there are many developers who switched from Parcel to Vite, like in this Github Discussion.

Martinsos commented 2 years ago

Another user (@MetaMmodern) suggesting we switch to Vite:

the thing about webpack is that webpack sucks))))) as well as CRA. So when CRA see's that somewhere upper in the tree incompatible version of webpack is installed it does not want to start. (it should not however). Soooo, I strongly suggest you to move to Vite or rollup or esbuild. (Vite is my choice from now on, 0 config, fast, caching, really supercool)))

Martinsos commented 1 year ago

Potentially useful: https://noam.hashnode.dev/using-vite-to-serve-and-hot-reload-react-app-express-api-together .