vue3.0 引用公共文件的混入样式,报错:SassError: Undefined mixin.定位于@include XXXXXX;
vue3.0根目录新建文件vue.config.js配置:module.exports = {css: {loaderOptions: {sass: {prependData: `@import "@/assets/css/mixin.scss";`}}...
·
vue3.0根目录新建文件vue.config.js
配置:
module.exports = { css: { loaderOptions: { sass: { prependData: `@import "@/assets/css/mixin.scss";` } } } }
注:旧版本sass 用data: `@import "@/assets/css/mixin.scss";`
新版本sass 用prependData: `@import "@/assets/css/mixin.scss";`
否则报错:options has an unknown property 'data'.
更多推荐
已为社区贡献1条内容
所有评论(0)