bootstrap-filestyle icon indicating copy to clipboard operation
bootstrap-filestyle copied to clipboard

Minification failed when trying to bundle with Visual Studio 2013

Open YovavGad opened this issue 11 years ago • 3 comments

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);

YovavGad avatar Jul 06 '15 06:07 YovavGad

To use a code compressor you can not use an already compressed code. This results in errors in the compressor.

markusslima avatar Jul 06 '15 11:07 markusslima

Stay closer it is the second time you open the same issue

markusslima avatar Jul 06 '15 11:07 markusslima

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);

YovavGad avatar Jul 06 '15 17:07 YovavGad