-
Notifications
You must be signed in to change notification settings - Fork 903
chore: Use Vite instead of Webpack for development #4156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming bundle-size is similar, I'm in support. Could we add data on how much faster it is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ Why do we have to add this? (Or is this a file move? hard to tell)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vite requires the HTML file to be in the root.
@@ -10,6 +10,7 @@ | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.