Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AMD path for SystemJS #6752

Closed
jlchereau opened this issue Mar 3, 2022 · 4 comments
Closed

Fix AMD path for SystemJS #6752

jlchereau opened this issue Mar 3, 2022 · 4 comments
Assignees
Labels
Bug FP: Completed Sync status with associated Feedback Item jQuery
Milestone

Comments

@jlchereau
Copy link
Contributor

jlchereau commented Mar 3, 2022

Bug report

In the commercial distribution for jQuery (zip file, not npm package), a file like kendo.colorpicker.js has:

(function(f, define){
    define('colorpicker/colorselector',[ "../kendo.core" ], f);
})(function(){

but kendo.core.js cannot be found in the parent directory as it is located in the same directory as kendo.colorpicker.js.

Many other files are concerned. Another example is kendo.dataviz.diagram.js:

(function(f, define){
    define('dataviz/diagram/utils',[ "../../kendo.core" ], f);
})(function(){

Reproduction of the problem

Download kendoui.for.jquery.2022.1.301.commercial-source.zip and use an AMD loader

Current behavior

Files cannot be found (again, see #6683).

Expected/desired behavior

AMD loader should load file.

Environment

Kendo UI version: 2022.1.301
jQuery version: 3.6.0
Browser: all

@jlchereau jlchereau changed the title AMD loading once again completely broken AMD loading broken once again [2022.1.301] Mar 3, 2022
@kendo-bot kendo-bot added the FP: Unplanned Sync status with associated Feedback Item label Mar 4, 2022
@Iankodj
Copy link
Contributor

Iankodj commented Mar 7, 2022

We replaced the AMD loader we use to compile the scripts with RequireJS and this might be the reason for this. Can you please share the SystemJS config you are using?

@jlchereau
Copy link
Contributor Author

jlchereau commented Mar 7, 2022

@Iankodj I use SystemJS v0.21.6 for component development and unit tests. I use webpack latest version for the entire solution. I had to replace "../kendo. and "../../kendo. with "kendo. in all kendo UI js files to fix loading both with SystemJS and webpack. Note that this is simply rolling back to AMD definitions as they were in previous versions of Kendo UI.

It seems that your development files are organized in a hierarchy of directories but the release files are reorganized in a single directory and the AMD definitions are not updated to reflect this.

system.config.zip

@Iankodj
Copy link
Contributor

Iankodj commented Mar 9, 2022

Thanks for the update. Yes there is folder organization and later files are being optimized. The reason is the switch to RequireJS optimizer due to modernization. We will look into it and if possible tweak the compilation process.

@nelito987
Copy link
Contributor

Reported in ticket ID: 1562499

@kendo-bot kendo-bot added FP: Planned Sync status with associated Feedback Item FP: In Development Sync status with associated Feedback Item FP: Completed Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item FP: Planned Sync status with associated Feedback Item FP: In Development Sync status with associated Feedback Item labels May 4, 2022
@dtopuzov dtopuzov added this to the 2022.1.SP.next milestone May 9, 2022
@dtopuzov dtopuzov closed this as completed May 9, 2022
@Dimitar-Goshev Dimitar-Goshev changed the title AMD loading broken once again [2022.1.301] Fix AMD path for SystemJS May 9, 2022
@Dimitar-Goshev Dimitar-Goshev modified the milestones: 2022.1.SP.next, 2022.R2 May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug FP: Completed Sync status with associated Feedback Item jQuery
Projects
None yet
Development

No branches or pull requests

6 participants