ERROR in static/js/vendor.cd343368afc930cacc1d.js from UglifyJs
Unexpected token: name (result) [./node_modules/_asn1.js@5.4.1@asn1.js/lib/asn1/base/node.js:282,0][static/js/vendor.cd343368afc930cacc1d.js:31281,6]

Build failed with errors.

起因:

项目新安装js-md5和node-rsa依赖包,打包出现了这个报错

原因:

使用webpack打包的时候会出现Unexpected token: name的问题,
是因为在webpack.config.js中的loaders过滤了node_modules,但是有依赖的模块需要进行babel处理

解决方案:

webpack.base.conf.js

webpack 打包异常 UglifyJs Unexpected token: name (result)

 

 

 

 

参考地址:https://www.codeleading.com/article/75975323194/

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
猜你喜欢
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案