Minification failed when trying to bundle with Visual Studio 2013
This is a great project - can anyone tell me how to fix this?
/* Minification failed. Returning unminified contents. (10,6304): run-time error JS1004: Expected ';' (10,6304-6305): run-time error JS1195: Expected expression: : (10,6346-6347): run-time error JS1002: Syntax error: } (10,6362-6363): run-time error JS1002: Syntax error: } (10,6363-6364): run-time error JS1195: Expected expression: ) (10,6364-6365): run-time error JS1002: Syntax error: } (10,6365-6366): run-time error JS1195: Expected expression: ) (10,6366-6367): run-time error JS1002: Syntax error: } (10,6367-6368): run-time error JS1195: Expected expression: ) */
Code used:
var scriptPlugins = new ScriptBundle("~/js/plugins"); scriptPlugins.Include("~/Scripts/bootstrap/bootstrap-filestyle.min.js"); scriptPlugins.Transforms.Add(jsTransformer); scriptPlugins.Transforms.Add(new JsMinify()); scriptPlugins.Orderer = nullOrderer; bundles.Add(scriptPlugins);
To use a code compressor you can not use an already compressed code. This results in errors in the compressor.
Stay closer it is the second time you open the same issue
No, this is not resolved...
See for yourself - try to minify the non minified version and it will fail with Visual Studio bundles. (I copied the wrong code above - use the file: bootstrap-filestyle.js) by the way, even if you include an already minified file it should not cause these errors...
var scriptPlugins = new ScriptBundle("~/js/plugins"); scriptPlugins.Include("~/Scripts/bootstrap/bootstrap-filestyle.js"); scriptPlugins.Transforms.Add(jsTransformer); scriptPlugins.Transforms.Add(new JsMinify()); scriptPlugins.Orderer = nullOrderer; bundles.Add(scriptPlugins);