Skip to content

Commit ea0a366

Browse files
committed
chore: clear scss additionalData
1 parent c501322 commit ea0a366

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

vite.config.ts

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,24 @@ export default defineConfig(async ({ command, mode }) => {
5959
host: '0.0.0.0'
6060
},
6161
css: {
62-
preprocessorOptions: {
63-
scss: {
64-
additionalData: (code: string, path: string) => {
65-
// 篡改组件库基础样式中的变量文件的引用
66-
if (vxpStylePresetRE.test(path)) {
67-
if (path.includes('dark')) {
68-
return code.replace("@use './variables.scss' as *;", `@use '${darkPath}' as *;`)
69-
}
70-
71-
return code.replace(
72-
"@use './design/variables.scss' as *;",
73-
`@use '${basePath}' as *;`
74-
)
75-
}
76-
77-
return code
78-
}
79-
}
80-
}
62+
// preprocessorOptions: {
63+
// scss: {
64+
// additionalData: (code: string, path: string) => {
65+
// // 篡改组件库基础样式中的变量文件的引用
66+
// if (vxpStylePresetRE.test(path)) {
67+
// if (path.includes('dark')) {
68+
// console.log(path)
69+
// return code.replace("@use './variables.scss' as *;", `@use '${darkPath}' as *;`)
70+
// }
71+
// return code.replace(
72+
// "@use './design/variables.scss' as *;",
73+
// `@use '${basePath}' as *;`
74+
// )
75+
// }
76+
// return code
77+
// }
78+
// }
79+
// }
8180
},
8281
build: {
8382
chunkSizeWarningLimit: 10 * 1024,

0 commit comments

Comments
 (0)