diff options
author | Vitaly Takmazov | 2021-03-24 23:05:17 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-03-24 23:05:17 +0300 |
commit | 792834ee2d6d6f120ce311fe7326475a3e25f59d (patch) | |
tree | a55747dbf1c085225c13a0b61cda6a8777e1662f /postcss.config.js | |
parent | aa5145973a1fe331c06fae5713690ba4eb2df531 (diff) |
Compile CSS with postcss-cli
Diffstat (limited to 'postcss.config.js')
-rw-r--r-- | postcss.config.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 00000000..65a5b8a8 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,14 @@ +module.exports = (ctx) => { + const production = ctx.env === 'production'; + const config = { + map: production ? false : ctx.options.map, + plugins: { + 'postcss-import': {}, + 'stylelint': production ? false : {}, + 'postcss-preset-env': { stage: 0 }, + 'cssnano': production ? { preset: 'default' } : false, + }, + }; + return config; +}; + |