2020-05-06 14:02:56 +00:00
|
|
|
const packageConfig = require('./package.json');
|
2020-03-13 08:46:11 +00:00
|
|
|
const postcssPresetEnv = require('postcss-preset-env');
|
2020-04-25 12:47:20 +00:00
|
|
|
const autoprefixer = require('autoprefixer');
|
2020-02-28 13:36:42 +00:00
|
|
|
const cssnano = require('cssnano');
|
|
|
|
|
|
|
|
const config = () => ({
|
2020-04-25 12:07:55 +00:00
|
|
|
plugins: [
|
2020-05-08 10:50:04 +00:00
|
|
|
// Explicitly specify browserslist to override ones from node_modules
|
|
|
|
// For example, Swiper has it in its package.json
|
2023-03-29 04:38:22 +00:00
|
|
|
postcssPresetEnv({ browsers: packageConfig.browserslist }),
|
|
|
|
autoprefixer({ overrideBrowserslist: packageConfig.browserslist }),
|
2020-04-25 12:07:55 +00:00
|
|
|
cssnano()
|
|
|
|
]
|
2020-03-13 08:46:11 +00:00
|
|
|
});
|
2020-02-28 13:36:42 +00:00
|
|
|
|
2020-04-25 12:07:55 +00:00
|
|
|
module.exports = config;
|