PPTist/vue.config.js

40 lines
892 B
JavaScript
Raw Normal View History

2020-12-10 22:40:15 +08:00
const StyleLintPlugin = require('stylelint-webpack-plugin')
module.exports = {
css: {
loaderOptions: {
sass: {
prependData: `
@import "~@/assets/styles/variable.scss";
@import "~@/assets/styles/mixin.scss";
`,
},
less: {
lessOptions: {
modifyVars: {
2021-01-06 22:21:38 +08:00
'primary-color': '#d14424',
'link-color': '#d14424',
2020-12-10 22:40:15 +08:00
},
javascriptEnabled: true,
},
},
},
},
chainWebpack: config => {
config.module
.rule('images')
.use('url-loader')
.loader('url-loader')
2020-12-21 17:30:43 +08:00
.tap(options => Object.assign(options, { limit: 5120 }))
2020-12-10 22:40:15 +08:00
},
configureWebpack: {
plugins: [
new StyleLintPlugin({
files: ['src/**/*.{vue,html,css,scss,sass,less}'],
failOnError: false,
cache: false,
fix: false,
2020-12-11 10:47:53 +08:00
}),
2020-12-10 22:40:15 +08:00
],
},
}