小编Jam*_*urz的帖子

MVC4 Bundle缩小不适用于javascript保留字

使用最新版本的MVC4,当它包含保留字作为键名时,我无法缩小javascript!

请参阅下面的错误,其中包含应该缩小的有效javascript.

有谁知道如何修复这个短的重写javascript使用[""]表示法?

PS有问题的代码是几千行,所以它不是一个选项!

/* Minification failed. Returning unminified contents.
(3,9-15): run-time warning JS1010: Expected identifier: delete
(4,9-13): run-time warning JS1010: Expected identifier: case
(5,9-11): run-time warning JS1010: Expected identifier: if
(3,9-15): run-time error JS1137: 'delete' is a new reserved word and should not be used as an identifier: delete
(4,9-13): run-time error JS1137: 'case' is a new reserved word and should not be used as an identifier: case
(5,9-11): run-time error JS1137: 'if' is a new reserved word and …
Run Code Online (Sandbox Code Playgroud)

javascript asp.net-mvc-4 bundling-and-minification asp.net-optimization

13
推荐指数
1
解决办法
4991
查看次数