3 ms·
Create-react-app is deprecated? And the recommended replacement for SPAs is from the guy that makes Vue? What on earth?
by stickfigure 4y ago
Create-react-app is deprecated? And the recommended replacement for SPAs is from the guy that makes Vue? What on earth?
- ppseafield 4y agoIt started out as one of his projects - an experiment to see if esbuild and native JS modules support in browsers could be used for development instead of webpack. It's become it's own project and has a large plugin ecosystem. The project doesn't involve vue, although it's the currently prescribed way to build vue projects now.
- pcthrowaway 4y agoYep, see https://github.com/reactjs/react.dev/pull/5487#issuecomment-1409720741 https://github.com/reactjs/react.dev/pull/5487#issuecomment-...
- aobdev 4y agoIt seems crazy, but it’s true. Also consider that Vite is a wrapper around 2 tools that are impressive in their own right: esbuild and rollup (and the latter was created by the guy who made svelte!)
- WorldMaker 4y agoVite is just an opinionated replacement for webpack, one of the biggest parts of create-react-app (which is obvious if you eject). This article's writer believes the out-of-the-box config for Vite is close enough to pre-eject CRA webpack config to be a drop in replacement. You could stick with webpack. Its defaults have gotten better, even if CRA never quite aligned with that shift. (It is still slow and prone to config-related crankiness, but you don't need two thirds of what CRA ejected.) So far in my own development, I find I generally prefer to use esbuild directly rather than the added weight of Vite and sometimes Vite feels like Create-React-App in that way that it obscures the power of the underlying components, though unlike Create-React-App Vite doesn't offer any sort of "eject" option. Vite adds some nice things like HMR support, but also now that browsers support script type="module" you can get nice dev experiences from unbundled modules without HMR and tools like esbuild/webpack become more of a "final pass" for Production rather than an always present development need. (Which is how Vite powers things like HMR, too, but you can do it by hand so easily now, I haven't yet been convinced to use Vite in a project.)