I’ve just uploaded a sample twitter bootstrap app to app harbor using the sample mvc 4 nuget package and am getting the following javascript error when clicking on any of the buttons at the top of the sample landing page:
Uncaught SyntaxError: Unexpected token *
Everything works fine locally and I’ve checked that all the files I’ve got locally are in my bitbucket repo.
All files are being request and and returned correctly with statuses of 200.
I have tried this in chrome and IE. Same problem.
Anyone got any ideas why this might be happening on APPHB but not locally?
Ok, I found the answer to this problem. The outline of the issue can be found on:
http://bugs.jquery.com/ticket/13274
It’s to do with how the minifier deals with
//@ sourceMappingURL=jquery.min.mapThese “comments” are useful for debugging minified js files as they give you a link back to the unminified version but they seem to cause a problem with the minifier.
You’ve got two option to solve this. Either remove the lines completely. Or escape them with block comments like:
Instead of the default: