Use SCSS and PostCSS with Rollup

This commit is contained in:
2020-01-02 14:15:37 +01:00
parent 3ed48ebcfb
commit 6b221c2172
8 changed files with 2077 additions and 78 deletions

35
postcss.config.js Normal file
View File

@@ -0,0 +1,35 @@
const dev = process.env.NODE_ENV === 'development'
let config = {
plugins: {
// Preset Env
'postcss-preset-env': {
},
// Autoprefixer
autoprefixer: {
},
// Extract media queries
// 'postcss-combine-media-query': {
// }
}
}
// Production only
// CSS Nano for production
if (!dev) {
config.plugins.cssnano = {
preset: 'default',
autoprefixer: true,
discardComments: { removeAll: true },
calc: { precision: 2 },
safe: true
}
}
// Export
module.exports = config