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

Custom Download JS breaks in RequireJS

7 Answers 171 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marlon
Top achievements
Rank 1
Marlon asked on 06 Feb 2015, 11:50 PM
I created a custom download via http://www.telerik.com/download/custom-download

I was under the impression that I could use this to replace a reference to kendo.all.min.js.

We're using requirejs in our app and although the kendo.all file works fine, the custom.js breaks our app. We get reference errors for kendo.data doesn't exist.

Is there fundamental difference between referencing kendo in the .all js file vs a custom download that I'm missing?

7 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 10 Feb 2015, 11:35 AM
Hello,

The script produced by the download builder does not contain require definitions.
It must be loaded via a shim.

The individual component scripts do contain module definitions and can be loaded with RequireJS.

I hope this sheds some light on the problem.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Jonathan
Top achievements
Rank 1
answered on 22 Mar 2016, 05:21 PM
Custom downloads appear to be broken for RequireJS in v2016.1.226.  The download now appears to be a bunch of concatenated AMD modules but I could not find a module in the download that bundles.  For example kendo.all.min.js includes a module "kendo.all.min" to reference in requirejs.  For version 2015.3.1111 and lower I was able to use a shim but the latest download no longer appears to export a global.  
0
T. Tsonev
Telerik team
answered on 25 Mar 2016, 09:14 AM
Hello,

Please accept my apologies for the delayed response.

This is a result of a breaking change that we introduced in the module naming for the Q1 release.
It was not intended, but I don't see a way of fixing it without breaking the module names yet again.

Our recommendation for RequireJS is to use either the individual scripts or bundles built with gulp.
I'll note this in the documentation as well.

Apologies for the caused inconvenience.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Derek
Top achievements
Rank 1
answered on 09 Jan 2018, 09:08 PM

Any updates on this?  The original bugs back in 2016 caused us to leave some of our AngularJS / RequireJS projects stuck on 2015 versions (or upgrading, but loading the complete massive kendo.all.min.js).  But we would like to upgrade (and shrink) them.  After all, that's why we purchase Kendo UI licenses.

In testing again today, I found that it's the same - I can use the Custom Download Builder on 2015 versions, but the more recent versions I tried failed.  I thought this might have been fixed by now. No luck creating custom bundles (gulp or otherwise) and shimming them; the internal modules are out of whack.

Any hope for a fix so we can have our upgrade and shrink it too?

0
Misho
Telerik team
answered on 11 Jan 2018, 01:25 PM
Hi,

As of 2016, the RequireJS project is mostly superseded by solutions like Webpack, Browserify and SystemJS, which provide much more extensible API.
The issue has been discussed in details also in the following forum thread:
https://www.telerik.com/forums/issues-loading-latest-kendo-version-using-requirejs

You may also refer to our documentation article for examples of running Kendo with RequireJS.


Regards,
Misho
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Derek
Top achievements
Rank 1
answered on 11 Jan 2018, 01:56 PM

Thank you, Misho.  I'm aware of the information you posted as well as these other loaders/bundlers; we use them on other projects (although we've abandoned SystemJS).  However, we have a lot of projects that were built using requireJS and switching them is not an option.  Kendo UI fully supported requirejs until bugs appeared in 2016. 

I'm only requesting that you fix the bugs so that we can upgrade our Kendo versions in our requirejs-based projects.  If you don't want to fix the Custom Download tool, that's fine; at least fix the gulp-based builder.  Javier Sainz's gulpfile gist looks promising; I'll try that and open a support ticket if that doesn't work for us.

0
Misho
Telerik team
answered on 15 Jan 2018, 03:26 PM
Hi,

There are no plans to modify the current named modules. 
Besides the links above there is detailed explanation for the change in the following Post: https://github.com/telerik/kendo-ui-core/issues/2080#issuecomment-240777744
To upgrade the Kendo versions in requirejs-based projects a possible workaround is to include the named AMD modules in the require config:

 http://dojo.telerik.com/oNUMe


Regards,
Misho
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Marlon
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Jonathan
Top achievements
Rank 1
Derek
Top achievements
Rank 1
Misho
Telerik team
Share this question
or