Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
317 views
in Technique[技术] by (71.8m points)

如何让requirejs不要压缩某个文件?

最近在build的配置文件加上了不跳过错误的条件,但检测到了workbox-sw里面的错误,想着看能不能配置跳过压缩某些文件,但并没有找到。

stack overflow上有一个提问也一直没有答案,难道requirejs配置不支持?

补充

项目代码还比较旧,但现在大家已经习惯用ts写,会有很多es6的语法,r.js压缩build的时候,会跳过这些错误,直接整个js文件不做uglify处理,所以要开启不跳过错误的配置:

throwWhen: {
    optimize: true
},

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...