2017-10-02 03:05:28 +00:00
|
|
|
const reload = require('require-nocache')(module);
|
|
|
|
|
|
|
|
module.exports = (ctx, configPath, options) => {
|
|
|
|
const config = {
|
|
|
|
plugins: {
|
2017-10-07 06:21:06 +00:00
|
|
|
'postcss-mixins': {
|
|
|
|
mixinsDir: [
|
|
|
|
'frontend/src/Styles/Mixins'
|
|
|
|
]
|
|
|
|
},
|
2017-10-02 03:05:28 +00:00
|
|
|
'postcss-simple-vars': {
|
|
|
|
variables: () =>
|
|
|
|
ctx.options.cssVarsFiles.reduce((acc, vars) => {
|
|
|
|
return Object.assign(acc, reload(vars));
|
|
|
|
}, {})
|
|
|
|
},
|
|
|
|
'postcss-nested': {},
|
|
|
|
autoprefixer: {
|
|
|
|
browsers: [
|
|
|
|
'Chrome >= 30',
|
|
|
|
'Firefox >= 30',
|
|
|
|
'Safari >= 6',
|
|
|
|
'Edge >= 12',
|
|
|
|
'Explorer >= 11',
|
|
|
|
'iOS >= 7',
|
|
|
|
'Android >= 4.4'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
return config;
|
|
|
|
};
|