-
-
Notifications
You must be signed in to change notification settings - Fork 609
Description
Description:
With the ability of supporting Node/CommonJS, Fancytree can use require("jquery"), however, Jquery-ui does not support the functionality.
So I ran into the issue of Fancytree using it's local version of jquery-ui and expecting jquery to be in the window, whilst also importing jquery and expecting it to be the same instance.
A solution to this was to import jquery in my entry file and then assign window.jQuery and then dynamic import the app to allow jQuery to be set up before continuing
Issue:
Fancytree requires jquery-ui then jquery, but jquery-ui relies on window.jQuery
Potential fix?:
Arrange the code below to require jquery first, then require jquery.fancytree.ui-deps, then return
fancytree/src/jquery.fancytree.js
Lines 22 to 25 in 28823fa
| } else if (typeof module === "object" && module.exports) { | |
| // Node/CommonJS | |
| require("./jquery.fancytree.ui-deps"); | |
| module.exports = factory(require("jquery")); |
Caveat:
This very well could be due to how I have laid out the application, a bug with Angular's builder or a bug with Fancytree's importing order, but it does seem to me that there's a fix possible in Fancytree