forked from shubhadip/vue3-component-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
postcss.config.js
29 lines (27 loc) · 877 Bytes
/
postcss.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
const path = require("path");
module.exports = {
plugins: {
"postcss-import": {
resolve(id, basedir) {
// resolve alias @css, @import '@css/style.css'
// because @css/ has 5 chars
if (id.startsWith("@css")) {
return path.resolve("./src/assets/styles/css", id.slice(5));
}
// resolve node_modules, @import '~normalize.css/normalize.css'
// similar to how css-loader's handling of node_modules
if (id.startsWith("~")) {
return path.resolve("./node_modules", id.slice(1));
}
// resolve relative path, @import './components/style.css'
return path.resolve(basedir, id);
}
},
"postcss-simple-vars": {},
"postcss-nested": {},
"postcss-url": {},
autoprefixer: {
overrideBrowserslist: "> 1%, IE 6, Explorer >= 10, Safari >= 7"
}
}
};