refactor: 升级vite
至v6
版本,升级sass
至最新版,重构主题写法,弃用@pureadmin/theme
#1188
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.config.*.timestamp*
文件,相关链接:fix(config): write temporary vite config to node_modules vitejs/vite#18509sass
弃用了@import
指令并使用现代api
,同时vite6
在scss
处理中也使用"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/Cannot find module 'sass'
报错,如下图:一些分享:
rolldown 已准备好取代 esbuild 来预捆绑依赖项。这实际上可能适用于
Vite 7
,而在Vite 6
中,它最终可能会成为选择加入以开始试水。参考链接:vitejs/vite#15886使用 rolldown 会带来更快的
hmr
、打包和编译速度!参考下图:图片来源视频
图片来源视频
图片来源视频
最后这个
pr
合并后,vue-pure-admin
将发布5.9.0
版本,我们强烈推荐大家进行同步更新,方便后续能平滑地过渡到vite7
版本