




























flex gap 对老版本浏览器兼容 - "flex-gap-polyfill": "^1.0.4", 老版 对 vue2 iview 打包失败的解决方案
打包 报错信息
ERROR Error: CSS minification error: Lexical error on line 1: Unrecognized text.
Erroneous area:
1: -1 * inherit * var(--fgp-gap_percentage-decimal_row)
^.......^. File: css/app.b9beb71f.css
Error: CSS minification error: Lexical error on line 1: Unrecognized text.
Erroneous area:
1: -1 * inherit * var(--fgp-gap_percentage-decimal_row)
^.......^. File: css/app.b9beb71f.css
at _web\node_modules\@intervolga\optimize-cssnano-plugin\index.js:106:21
at async Promise.all (index 0)
* The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command npm run build" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
解决方案:压缩css代码导致报错,所以不压缩css
vue.config.js
chainWebpack: config => {
if (process.env.NODE_ENV === 'production') {
// 极其保险的写法:直接遍历并拔掉这个报错的插件
config.plugins.delete('optimize-css');
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。