Loading

4年前的React老项目打包报错解决问题处理过程

处理公司一个4年前React应用时,发现打包编译时会出现如题错误:Failed to minify the bundle. Error: index.71782de2.js from Uglify]s 

 查看打包编译后源码错误位置:

 经过bing搜索引擎查找类似解决方式: https://github.com/sorrycc/blog/issues/68 

1、npm 安装 https://github.com/umijs/es5-imcompatible-versions 这个插件。

npm install es5-imcompatible-versions

2、roadhog

确保 roadhog 在 2.4.0-beta.3 或以上,然后在 .webpackrc 里配:

 3.编译打包通过。

posted @ 2024-03-22 13:40  Tipsy(微醺)  阅读(199)  评论(0)    收藏  举报