Skip to content

更新 Vite 版本#2206

Open
Azir-11 wants to merge 2 commits intoflipped-aurora:dev-2.9.2from
Azir-11:dev-2.9.2
Open

更新 Vite 版本#2206
Azir-11 wants to merge 2 commits intoflipped-aurora:dev-2.9.2from
Azir-11:dev-2.9.2

Conversation

@Azir-11
Copy link
Copy Markdown
Member

@Azir-11 Azir-11 commented May 8, 2026

更新 vite 至 vite8,默认打包器换为 rolldown,打包时间提升至 2s(macos26 m2 芯片),去除使用 @vitejs/plugin-legacy 里对于传统浏览器的支持,改为 rolldown 原生支持,现在支持最低的浏览器版本是:

  • Chrome >=64
  • Firefox >=67
  • Safari >=11.1
  • Edge >=79

Vite 需要 Node.js 版本 20.19+, 22.12+。然而,有些模板需要依赖更高的 Node 版本才能正常运行,当你的包管理器发出警告时,请注意升级你的 Node 版本。

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 将前端构建体系升级到 Vite 8,并配合默认打包器切换到 Rolldown,同时移除 legacy 兼容方案以提升构建速度并提高最低浏览器版本基线。

Changes:

  • vite 升级至 ^8.0.10,并同步升级相关 Vite 插件版本、移除 @vitejs/plugin-legacytersercore-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 thread web/vite.config.js
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'
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你知道怎么写代码么你?项目你跑过吗?被坦克压过腿吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants