-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
What problem does this feature solve?
I read the vue-cli docs about sass-resources-loader section and can not understand how to configure the vue-cli project for this.
After some codes reading,I write these codes for that loader to work out:
//vue.config.js
var path = require('path');
module.exports = {
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
var scssResourceLoader = {
loader: 'sass-resources-loader',
options: {
resources: path.resolve(__dirname, 'src/assets/_variables.scss')
}
};
options.loaders.scss.push(scssResourceLoader);
return options;
});
}
}
I hope this will help others.
What does the proposed API look like?
...
LeBenLeBen and farin
Metadata
Metadata
Assignees
Labels
No labels