更新 Vite 版本#2206
Open
Azir-11 wants to merge 2 commits intoflipped-aurora:dev-2.9.2from
Open
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 将前端构建体系升级到 Vite 8,并配合默认打包器切换到 Rolldown,同时移除 legacy 兼容方案以提升构建速度并提高最低浏览器版本基线。
Changes:
- 将
vite升级至^8.0.10,并同步升级相关 Vite 插件版本、移除@vitejs/plugin-legacy、terser、core-js等依赖。 - 调整
vite.config.js:移除 legacy 插件配置,改用build.rolldownOptions并设置构建目标与产物命名规则。 - 将
person.vue的样式改为scoped,避免样式外溢。
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| web/vite.config.js | 适配 Vite 8 / Rolldown 的构建配置与输出命名;移除 legacy 支持相关配置 |
| web/src/view/person/person.vue | 将样式块改为 scoped,限制样式作用域 |
| web/package.json | 升级 Vite 与相关插件;移除 legacy/terser/core-js 等依赖 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
21
to
23
| const alias = { | ||
| '@': path.resolve(__dirname, './src'), | ||
| '@': path.resolve(import.meta.dirname, './src'), | ||
| vue$: 'vue/dist/vue.runtime.esm-bundler.js' |
Member
Author
There was a problem hiding this comment.
你知道怎么写代码么你?项目你跑过吗?被坦克压过腿吗?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
更新 vite 至 vite8,默认打包器换为 rolldown,打包时间提升至 2s(macos26 m2 芯片),去除使用 @vitejs/plugin-legacy 里对于传统浏览器的支持,改为 rolldown 原生支持,现在支持最低的浏览器版本是:
Vite 需要 Node.js 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。