Use SCSS and PostCSS with Rollup
This commit is contained in:
35
postcss.config.js
Normal file
35
postcss.config.js
Normal 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
|
||||
Reference in New Issue
Block a user