This switches to vite from create-react-app. It provides a much faster development experience as it's bundling is faster. create-react-app is also going through an identity crisis right now and it's future is uncertain. See here and here
Vite's benefit is build speed. Building our react boilerplate is quite slow unless you using a modern mac. Especially initial build. Vite is much faster due to it's underlying tech. Vite will also produce smaller production builds as rollup is generally a better bundler than webpack.
create-react-app is not just for generating a react application. It also serves as a configured webpack application bundler for running the application in development and building production builds.
A couple benchmarks on my m2 mac:
Production build time
Using yarn build
vite: 8s
react-scripts: 19s
Dev server cold startup time
Removing any cache in node_modules/.cache and then yarn start
vite: 250ms
react-scripts 11s
Removal of tests
I've also removed our tests in this branch as I think they've gone on too long without providing value and we would need to invest time to get them working with vite, so I think it's best to get rid of them at the moment.
This switches to vite from create-react-app. It provides a much faster development experience as it's bundling is faster. create-react-app is also going through an identity crisis right now and it's future is uncertain. See here and here
Vite's benefit is build speed. Building our react boilerplate is quite slow unless you using a modern mac. Especially initial build. Vite is much faster due to it's underlying tech. Vite will also produce smaller production builds as rollup is generally a better bundler than webpack.
create-react-app is not just for generating a react application. It also serves as a configured webpack application bundler for running the application in development and building production builds.
A couple benchmarks on my m2 mac:
Production build time
Using
yarn build
vite
: 8sreact-scripts
: 19sDev server cold startup time
Removing any cache in
node_modules/.cache
and thenyarn start
vite
: 250msreact-scripts
11sRemoval of tests
I've also removed our tests in this branch as I think they've gone on too long without providing value and we would need to invest time to get them working with vite, so I think it's best to get rid of them at the moment.