Skip to content
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

refactor: 升级vitev6版本,升级sass至最新版,重构主题写法,弃用@pureadmin/theme #1188

Merged
merged 8 commits into from
Dec 10, 2024

Conversation

xiaoxian521
Copy link
Member

@xiaoxian521 xiaoxian521 commented Nov 2, 2024

优化点如下:

  1. 项目启动或打包不再生成vite.config.*.timestamp*文件,相关链接:fix(config): write temporary vite config to node_modules vitejs/vite#18509
  2. sass弃用了@import指令并使用现代api,同时vite6scss处理中也使用"modern-compiler"现代编译并且将在vite7中将legacy API移除。升级现代api的好处:更好的性能和编译速度,多次依赖相同的样式表不再会导致重复的CSS。相关链接:feat(css): support sass modern api vitejs/vite#17728 (comment)https://sass-lang.com/blog/import-is-deprecated/
  3. 重构主题写法,弃用 @pureadmin/theme 的好处:更简单的主题写法,减少了维护负担,彻底解决偶发的Cannot find module 'sass'报错,如下图:
image

一些分享:

rolldown 已准备好取代 esbuild 来预捆绑依赖项。这实际上可能适用于 Vite 7,而在 Vite 6 中,它最终可能会成为选择加入以开始试水。参考链接:vitejs/vite#15886

使用 rolldown 会带来更快的hmr、打包和编译速度!参考下图:

image

图片来源视频

image

图片来源视频

image

图片来源视频

最后这个pr合并后,vue-pure-admin将发布5.9.0版本,我们强烈推荐大家进行同步更新,方便后续能平滑地过渡到vite7版本

@xiaoxian521 xiaoxian521 added v5.9.0 5.9.0版本 PR::WIP 正在开发中 test:waiting 等待测试 labels Nov 2, 2024
@xiaoxian521 xiaoxian521 changed the title refactor: 升级vitev6版本,升级sass至最新版,重构主题写法,删除@pureadmin/theme refactor: 升级vitev6版本,升级sass至最新版,重构主题写法,弃用@pureadmin/theme Nov 7, 2024
@xiaoxian521
Copy link
Member Author

xiaoxian521 commented Nov 27, 2024

问题:microsoft/TypeScript#60603
修复:https://github.com/microsoft/TypeScript/pull/60687/files

等待 typescript 5.7.3 版本发布

@xiaoxian521 xiaoxian521 removed the PR::WIP 正在开发中 label Nov 27, 2024
@xiaoxian521
Copy link
Member Author

上游依赖bug修复 等待周期太长,先固定版本,后期升级

@xiaoxian521 xiaoxian521 added test:pass 测试通过 and removed test:waiting 等待测试 labels Dec 10, 2024
@xiaoxian521 xiaoxian521 merged commit 21ff69b into main Dec 10, 2024
1 check passed
@xiaoxian521 xiaoxian521 deleted the refactor/vite6-sass-theme branch December 14, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test:pass 测试通过 v5.9.0 5.9.0版本
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant