javaLuo / react-luo

React Automatically - 保持最新技术 react18 hooks router6 webpack5 babel7 antd4
https://isluo.com/work/pwa/
MIT License
312 stars 71 forks source link

linux 下生产压缩抱错 #9

Closed zhans1993 closed 5 years ago

zhans1993 commented 6 years ago

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":

javaLuo commented 6 years ago

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

zhans1993 commented 6 years ago

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

zhans1993 commented 6 years ago

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

javaLuo commented 6 years ago

额 好吧 解决了就行