System.web.optimization bundle breaks with Kendo 2021.2.616

2 Answers 10 Views
Chart
Gerardo
Top achievements
Rank 1
Veteran
Iron
Gerardo asked on 27 Aug 2021, 08:45 PM

Hi, we recently upgraded from kendo 2020 to 2021.2.616.

We use System.web.optimization to bundle resources, when building Debug configuration all works fine because bundling is disabled, however when building the Release configuration the bundle is missing some javascripts files, I can't figure out which ones. 

This is the bundle definition:


RegisterScriptBundle(bundles,"~/scripts/libraries",
                        "~/Scripts/jquery-1.12.4.min.js",
                        "~/Scripts/kendo/2021.2.616/kendo.all.min.js",
                        "~/Scripts/kendo/2021.2.616/kendo.aspnetmvc.min.js",
                        "~/Scripts/kendo/2021.2.616/cultures/kendo.culture.en.min.js",
                        "~/Scripts/jquery.unobtrusive-ajax.min.js",
                        "~/Scripts/jquery.knob.min.js",
                        "~/Scripts/kendo.web.ext.js",
                        "~/Scripts/jquery.charcounter.js",
                        "~/Scripts/jquery-ui-1.12.1.min.js");


The javascript error is:


Uncaught TypeError: r.clone is not a function
    at i.r [as bbox] (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19734)
    at i._clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19612)
    at i.clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19587)
    at ns (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:16998)
    at i._clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:20809)
    at i.clippedBBox (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:19587)
    at u._initGroups (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:20941)
    at u.reflow (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:20895)
    at init.reflow (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:154923)
    at init.reflow (libraries?v=uEIi5mr2MZbqm5xOzDimRmLOgXThBVTGFDgP5Q4dk2Q1:formatted:141656)

prettyfied related code: 

 looks like related to SVG, but how to know which files to include?

2 Answers, 1 is accepted

Sort by
0
Gerardo
Top achievements
Rank 1
Veteran
Iron
answered on 30 Aug 2021, 02:34 PM

it was not a dependency missing, looks like the minification performed by web.optimization package is altering the already minified kendo.all.min.js

I turned off that optimization (https://stackoverflow.com/a/21167876), just do the bundling and the problem was fixed.

0
Misho
Telerik team
answered on 01 Sep 2021, 11:07 AM

Hello,

I'm glad that you managed to resolve the issue with bundling Kendo scripts. As an additional resource you could check the following sample project which demonstrates using ASP.NET bundles with KendoUI:

https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/general/KendoAspNetBundles/KendoAspNetBundles 

Do not hesitate to write back, should you have other questions related to configuring Kendo widgets in your project.

Regards,
Misho
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Chart
Asked by
Gerardo
Top achievements
Rank 1
Veteran
Iron
Answers by
Gerardo
Top achievements
Rank 1
Veteran
Iron
Misho
Telerik team
Share this question
or