This is a migrated thread and some comments may be shown as answers.

MVC Bundling/Minification Failure for Kendo JS/CSS

1 Answer 308 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 01 Oct 2014, 04:58 PM
I am getting Minification failed errors when trying to bundle together Kendo CSS & JS (separately in ScriptBundle & StyleBundle).  Here is the bundle code from BundleConfig.cs:

bundles.Add(new ScriptBundle("~/Scripts/kendo/responsive-kendojs")
                .Include("~/Scripts/kendo/jquery.min.js")
                .Include("~/Scripts/kendo/kendo.all.min.js")
                .Include("~/Scripts/kendo/kendo.aspnetmvc.min.js"));

and

bundles.Add(new StyleBundle("~/Content/kendo/responsive-kendocss")
                .Include("~/Content/kendo/kendo.common.min.css")
                .Include("~/Content/kendo/kendo.common-bootstrap.min.css")
                .Include("~/Content/kendo/kendo.bootstrap.min.css")
                .Include("~/Content/kendo/kendo.mobile.all.min.css")
                .Include("~/Content/kendo/kendo.dataviz.min.css")
                .Include("~/Content/kendo/kendo.dataviz.bootstrap.min.css"));

When I load my page, the bundles come across properly, but when I inspect the contents of the bundles, I see this content:

for request:
http://localhost:2952/Scripts/kendo/responsive-kendojs?v=xBcra9G7ySZaZKhcyL_pQa3jyJ0xPNrIODFoRbbwXqA1

/* Minification failed. Returning unminified contents.
(47,9295-9302): run-time error JS1019: Can't have 'break' outside of loop: break e
(47,8578-8585): run-time error JS1019: Can't have 'break' outside of loop: break e
*/

and

for request:
http://localhost:2952/Content/kendo/responsive-kendocss?v=95SMW4BbxMxlmxetk9pG-NULh83t6TL_m0-g32mfJzU1

/* Minification failed. Returning unminified contents.
(36,46845): run-time error CSS1030: Expected identifier, found '.'
(36,46852): run-time error CSS1031: Expected selector, found ')'
(36,46852): run-time error CSS1025: Expected comma or open brace, found ')'
(36,59002): run-time error CSS1030: Expected identifier, found '.'
(36,59010): run-time error CSS1031: Expected selector, found ')'
(36,59010): run-time error CSS1025: Expected comma or open brace, found ')'
(36,85507): run-time error CSS1030: Expected identifier, found '.'
(36,85520): run-time error CSS1031: Expected selector, found ')'
(36,85520): run-time error CSS1025: Expected comma or open brace, found ')'
(36,100242): run-time error CSS1030: Expected identifier, found '.'
(36,100250): run-time error CSS1031: Expected selector, found ')'
(36,100250): run-time error CSS1025: Expected comma or open brace, found ')'
(36,101745): run-time error CSS1030: Expected identifier, found '.'
(36,101753): run-time error CSS1031: Expected selector, found ')'
(36,101753): run-time error CSS1025: Expected comma or open brace, found ')'
(36,101810): run-time error CSS1030: Expected identifier, found '.'
(36,101818): run-time error CSS1031: Expected selector, found ')'
(36,101818): run-time error CSS1025: Expected comma or open brace, found ')'
(36,101911): run-time error CSS1030: Expected identifier, found '.'
(36,101919): run-time error CSS1031: Expected selector, found ')'
(36,101919): run-time error CSS1025: Expected comma or open brace, found ')'
*/

I am currently using v2014.2.716 and VS2010 and MVC4.

Please let me know if you need additional info.
Thanks,
--Ed

1 Answer, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 03 Oct 2014, 12:23 PM
Hello Ed,

Thanks for the heads up. We'll investigate this issue and try to work around it.
Note that having a break statement outside of a loop is valid JavaScript. It's just that the ASP.NET minification doesn't like it.

My suggestion is to leave it as is, as excluding kendo.web.js requires ordering the scripts manually.

My apologies for the inconvenience.

Kind Regards,
Petur Subev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Ed
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or