在进行打包时遇到如下问题:
ERROR in static/js/1.cfcab24bbc3a028f94bf.js from UglifyJs
Invalid assignment [./~/@antv/g6/build/g6.js:9,98863][static/js/1.cfcab24bbc3a028f94bf.js:17729,98914
ERROR in static/js/23.1c99af7cadb146904f28.js from UglifyJs
Invalid assignment [./~/@antv/g6/build/g6.js:9,98863][static/js/23.1c99af7cadb146904f28.js:1343,98914
ERROR in static/js/46.0e8a870a61abcb3dd513.js from UglifyJs
Invalid assignment [./~/@antv/g6/build/g6.js:9,98863][static/js/46.0e8a870a61abcb3dd513.js:65,98914]
分析原因:g6包版本太高,进行版本修改
修改如下:
卸载依赖包node_modules,重新安装 npm install
进行打包 npm run build
成功打包