From 908cde6893f0e821f8296548c7067833f39230dc Mon Sep 17 00:00:00 2001 From: Amo Wu Date: Wed, 21 Aug 2019 09:59:43 +0800 Subject: [PATCH] fix: solve postcss-values-parser Syntax Error problem When using Rollup for balloon.css, `calc(var(--balloon-move) * -1))` will become like this `calc(var(--balloon-move)*-1))`. The space was removed. This will lead to postcss-values-parser Syntax Error, such as webpacker of Ruby on Rails. Ref https://github.com/postcss/postcss-custom-properties/issues/161#issuecomment-479025016 --- scripts/creatRollupConfig.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/creatRollupConfig.js b/scripts/creatRollupConfig.js index 6df811787..64ba91354 100644 --- a/scripts/creatRollupConfig.js +++ b/scripts/creatRollupConfig.js @@ -47,7 +47,12 @@ module.exports = function creatRollupConfig(projectPath) { plugins: [ autoprefixer(), cssnano({ - preset: 'default', + preset: [ + 'default', + { + calc: false + } + ], }), ], sourceMap: isProd ? false : true,