uglify js error unexpected token eof “undefined”

后端 未结 5 2236
时光取名叫无心
时光取名叫无心 2021-01-18 07:36

So I installed npm using npm install uglify-js

I run a command which is:

cat file1.js file2.js .. fileN.js | uglifyjs -o files.min.js
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-18 08:03

    Also faced this same issue. However, in my case, I could open the file with a problem and save it and then uglify would run without any issues.

    Documented here

    Workaround: I added a lineending task before invoking uglify to explicitly convert the line endings. Now uglify runs without issues.

提交回复
热议问题