错误描述:
Unhandled rejection Error: original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.
解决方案:
- 懒惰方案:
直接给vue.config.js
添加productionSourceMap: false
项跳过此功能。
module.exports = {
// other config
productionSourceMap: false
}
- 解决方法:执行
npm i terser@4.0.0
安装terser再进行编译
因为source map中缺少了terser模块导致
建议用第二种方式解决,否则你打包时各种分析都没有了。亲测都可以行
https://stackoverflow.com/questions/56820768/unhandled-rejection-error-when-building-vue-js-project