aboutsummaryrefslogtreecommitdiff
path: root/postcss.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-03-24 23:05:17 +0300
committerGravatar Vitaly Takmazov2021-03-24 23:05:17 +0300
commit792834ee2d6d6f120ce311fe7326475a3e25f59d (patch)
treea55747dbf1c085225c13a0b61cda6a8777e1662f /postcss.config.js
parentaa5145973a1fe331c06fae5713690ba4eb2df531 (diff)
Compile CSS with postcss-cli
Diffstat (limited to 'postcss.config.js')
-rw-r--r--postcss.config.js14
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;
+};
+