chore: Use Vite instead of Webpack for development#4156
Conversation
kylecarbs
left a comment
There was a problem hiding this comment.
Assuming bundle-size is similar, I'm in support. Could we add data on how much faster it is?
jsjoeio
left a comment
There was a problem hiding this comment.
Code looks great 💯 Mostly questions to understand the why behind some of the changes. Gonna checkout locally and test.
| @@ -0,0 +1,37 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
❓ Why do we have to add this? (Or is this a file move? hard to tell)
There was a problem hiding this comment.
Vite requires the HTML file to be in the root.
| "check:all": "yarn format:check && yarn lint && yarn test", | ||
| "chromatic": "chromatic", | ||
| "dev": "webpack-dev-server --config=webpack.dev.ts", | ||
| "dev:vite": "vite", |
There was a problem hiding this comment.
I like that you're leaving webpack in and encouraging folks to try vite. Seems like the right move and then when we're confident Vite works, we can remove webpack 👍🏼
|
Probably user error, but how do you log in when you use a different host? I tried with GitHub but get this error: I did get it to work by manually editing The first load of pages seems a bit slower (maybe the lazy load?) but other than that seems to work great! HMR is so fast with Vite! Screen.Recording.2022-09-23.at.10.41.52.AM.mov |
jsjoeio
left a comment
There was a problem hiding this comment.
One request: update ./scripts/develop.sh to use Vite!

Intentions:
How to use:
I would appreciate it if people could test it and help me to catch any bugs before replacing webpack entirely.