vite+ts+scss 设置多个scss公共样式不起作用

preprocessorOptions: {
 scss: {
    additionalData: `@use "./src/assets/scss/style.scss" as *;@use "./src/assets/scss/index.scss" as *;@use "./src/assets/scss/element-theme.scss";`,

  }
}

index.scss不起作用,在组件中加上

<style lang="scss">
//
</style>

就可以了,原理不知

posted @ 2022-10-25 14:09  bule蓝色  阅读(617)  评论(0编辑  收藏  举报