vue 全局引入 scss 变量
注意,他们不是实体的样式,所以在index.scss中引入是没有用的。
所以需要在vue.config.js中去配置
const {
defineConfig
} = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
css: {
loaderOptions: {
sass: {
// 全局引入变量和mixin
additionalData: `
@import "@/assets/scss/variable.scss";
@import "@/assets/scss/mixin.scss";
`
}
}
}
})
A little hug, little gift.
All of little something.
these are our meories.