javaLuo / react-luo

React Automatically - 保持最新技术 react18 hooks router6 webpack5 babel7 antd4

Home Page:https://isluo.com/work/pwa/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linux 下生产压缩抱错

zhans1993 opened this issue · comments

luo哥,你好,我在windows 环境下打包代码就不报错,在linux 下打包就报下面这个错,这是什么原因呢?

ERROR in vendors.js from UglifyJs
Unexpected token: name (urlParts) [vendors.js:62274,4]

ERROR in vendors.js from UglifyJs
Unexpected token: name (urlParts) [vendors.js:62274,4]
Child html-webpack-plugin for "index.html":

commented

是编译完了,运行的时候报错吗
等我弄个虚拟机看一下

不是运行抱错,是linux 下编译抱错,是我使用devserver 的原因么

我找到原因了,是webpack-dev-server 的问题,我在包的说明文档找到了,这种写法支持到2.7.1

commented

额 好吧
解决了就行