Skip to content

Commit 6b0e10b

Browse files
authored
Merge pull request #388 from seronna/dev
fix(修复Sass的@import规则已弃用警告问题)
2 parents 081834c + e05c7c2 commit 6b0e10b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vite.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ export default ({ mode }) =>
106106
css: {
107107
preprocessorOptions: {
108108
scss: {
109-
charset: false,
110-
additionalData: `@import "./src/style/global.scss";`,
109+
api: 'modern',
110+
additionalData: `@use "./src/style/global.scss" as *;`,
111+
silenceDeprecations: ["legacy-js-api"],
111112
},
112113
},
113114
},

0 commit comments

Comments
 (0)