开发者

SquishIt javascript error when minimized: 'missing ; before statement'

开发者 https://www.devze.com 2023-01-14 04:21 出处:网络
When I run SquishIt in development mode everything works fine. When I put it into production mode I am getting the \'missing ; before statement\' error in Javascript开发者_如何学编程. I\'ve tried remo

When I run SquishIt in development mode everything works fine. When I put it into production mode I am getting the 'missing ; before statement' error in Javascript开发者_如何学编程. I've tried removing the offending javascipt files, but the error moves down to the next one.

Any idea's?


One possibility is that you're missing a ; somewhere in your code that's being automatically inserted by the browser. Use jslint to find the offending lines of code.


I also posted this problem on the Squishit google groups. Justin reponded:

This is a known bug that is going to be fixed in an soon to be released SquishIt 0.6.1. Essentially the ajax minifier is compressing the files separately before we are combining them into one. This can cause the issue you are seeing. The fix in the meantime is to use the WithCompressor option and switch to something like the YUI compressor temporarily.the YUI compressor temporarily.

Bundle.JavaScript()
.Add("/Scripts/Frameworks/jquery.js").WithMinifier(JavaScriptMinifiers.Yui)
....
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号