-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Migrate demo from Webpack to Vite #832
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
@kingyue737 is attempting to deploy a commit to the EFE Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey @vercel, the build output is in |
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.
Do we still need plugin-legacy and browserslist? I think we can just support green browsers.
Our demo doesn't use any bleeding-edge runtime features, and most modern browsers do not need polyfill. We can remove Babel.
What do green browsers refer to? The default build target of Vite is
If green browsers mean, for example, > 1% of the audience worldwide or last 3 versions, etc., browerslist is still useful. |
Can you try adding a |
Thank you! BTW I believe you can create new branches within this repo itself instead of using a fork, so that Vercel won’t require deploy approvals from external fork. |
Motivation
Vue CLI has not been actively maintained for over three years. As Vite is now the officially recommended tooling for Vue 3 projects, migrating the demo to Vite provides a more relevant and modern example for most Vue 3 users. This change also improves the developer experience for contributors.
Vue ECharts currently uses Rollup and esbuild as the build tool, which is also the underlying bundler for Vite. Migrating to Vite significantly reduces the number of development dependencies (the
pnpm-lock.yaml
is >4000 lines shorter). Further optimizations will be made in upcoming PRs by updating and deduplicating dependencies.Major Changes
Replaced
babel-loader
withvite-plugin-legacy
Replaced
postcss-loader
andpostcss-nested
withpostcss-preset-env
Removed
raw-loader
Replaced
fork-ts-checker-webpack-plugin
withvue-tsc
Moved the
demo
folder out of thesrc
directory