-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
29 lines (27 loc) · 895 Bytes
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
let pluginList = require("@mozaic-ds/css-dev-tools/postcssPluginConfig");
const scssSyntax = require("postcss-scss");
// Remove stylelint plugin to use it as a webpack plugin due to an incompatibility
// between postcss stylelint plugin and vue-loader.
// See https://github.com/vuejs/vue-loader/issues/627#issuecomment-277753794
pluginList = pluginList.filter(
({ postcssPlugin }) => postcssPlugin !== "stylelint"
);
module.exports = {
publicPath: process.env.NODE_ENV === "production" ? "/vue-ads-webc-showcase/" : "/",
chainWebpack: (config) => {
config.module
.rule("postcss-scss")
.test(/\.scss$/)
.use("vue-style-loader")
.loader("postcss-loader")
.tap((options) => {
options = {
postcssOptions: {
syntax: scssSyntax,
plugins: pluginList,
},
};
return options;
});
},
};