Custom Download JS breaks in RequireJS

8 posts, 0 answers
  1. Marlon
    Marlon avatar
    18 posts
    Member since:
    Jul 2013

    Posted 06 Feb 2015 Link to this post

    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?
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2796 posts

    Posted 10 Feb 2015 Link to this post

    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!
     
  3. Jonathan
    Jonathan avatar
    10 posts
    Member since:
    Jun 2012

    Posted 22 Mar 2016 Link to this post

    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.  
  4. T. Tsonev
    Admin
    T. Tsonev avatar
    2796 posts

    Posted 25 Mar 2016 Link to this post

    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!
     
  5. Derek
    Derek avatar
    2 posts
    Member since:
    Jun 2016

    Posted 09 Jan in reply to T. Tsonev Link to this post

    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?

  6. Misho
    Admin
    Misho avatar
    167 posts

    Posted 11 Jan Link to this post

    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.
  7. Derek
    Derek avatar
    2 posts
    Member since:
    Jun 2016

    Posted 11 Jan in reply to Misho Link to this post

    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.

  8. Misho
    Admin
    Misho avatar
    167 posts

    Posted 15 Jan Link to this post

    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.
Back to Top