fix: fix build warning and linter error

This commit is contained in:
2026-07-19 16:25:46 +08:00
parent 0402f2d2b7
commit 108d1bac5c
5 changed files with 33 additions and 4 deletions
+12
View File
@@ -15,6 +15,18 @@ export default defineConfig({
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
css: {
preprocessorOptions: {
scss: {
// 静默来自 Bulma 0.9.1 的 Sass 弃用警告(import / global-builtin / color-functions / slash-div / if-function
// Bulma 0.9.1(发布于 2021 年)与新版 Dart Sass 不兼容。
// 我的 pnpm-lock.yaml 和 node_modules 中的 Dart Sass 是 Vite 8 自带的新版本,而 Bulma 0.9.1 使用了大量已被 deprecate 的 Sass 老语法。
// 我不想做任何升级,因此强制压制这些错误,还编译日志一个干净。
silenceDeprecations: ['import', 'global-builtin', 'color-functions', 'slash-div', 'if-function'],
},
},
},
// 项目基础路径(对应 Nginx 路由到的 /web 前缀)
base: '/web/',