Setup PostCSS
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
const POSTCSS = {
|
||||
'input': 'src/entry.css',
|
||||
'output': 'dist/carto_assets.css',
|
||||
'use': [
|
||||
'postcss-import',
|
||||
'postcss-cssnext'
|
||||
// 'postcss-browser-reporter',
|
||||
// 'postcss-reporter'
|
||||
],
|
||||
'postcss-import': {
|
||||
path: ['src']
|
||||
},
|
||||
'cssnano': {
|
||||
safe: true,
|
||||
autoprefixer: false //handled by postcss-cssnext
|
||||
},
|
||||
'local-plugins': true,
|
||||
'map': 'file'
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
POSTCSS.use.push('cssnano'); // add cssnano in production
|
||||
POSTCSS.map = false; //sourcemaps to external file
|
||||
}
|
||||
|
||||
module.exports = POSTCSS;
|
||||
Reference in New Issue
Block a user