21 lines
445 B
JavaScript
21 lines
445 B
JavaScript
|
|
const postcss = require('rollup-plugin-postcss');
|
||
|
|
const autoprefixer = require('autoprefixer');
|
||
|
|
const cssnano = require('cssnano');
|
||
|
|
module.exports = {
|
||
|
|
rollup(config, options) {
|
||
|
|
config.plugins.push(
|
||
|
|
postcss({
|
||
|
|
plugins: [
|
||
|
|
autoprefixer(),
|
||
|
|
cssnano({
|
||
|
|
preset: 'default',
|
||
|
|
}),
|
||
|
|
],
|
||
|
|
inject: false,
|
||
|
|
extract: !!options.writeMeta,
|
||
|
|
})
|
||
|
|
);
|
||
|
|
return config;
|
||
|
|
},
|
||
|
|
};
|