jQWidgets Forums
Forum Replies Created
-
Author
-
September 28, 2017 at 1:21 pm in reply to: Webpack 2: shimming like RequireJS? Webpack 2: shimming like RequireJS? #96390
That’s not it, wouldn’t make sense either since the script is clearly being loaded that way, otherwise I wouldn’t be getting that error in the first place.
Anyway, this was taking too long so I decided to deep dive and figure it out myself.
The answer can be found here.September 26, 2017 at 3:53 pm in reply to: Webpack 2: shimming like RequireJS? Webpack 2: shimming like RequireJS? #96333September 18, 2017 at 10:23 am in reply to: Webpack 2: shimming like RequireJS? Webpack 2: shimming like RequireJS? #96089Anyone?
September 14, 2017 at 2:04 pm in reply to: Webpack 2: shimming like RequireJS? Webpack 2: shimming like RequireJS? #96036Any feedback?
I can’t imagine that no one has ever done this before…September 13, 2017 at 4:25 pm in reply to: Webpack 2: shimming like RequireJS? Webpack 2: shimming like RequireJS? #95987Well yeah ok, of course, I know that.
In its most basic form you would include script tags in the order 1.jquery, 2.jqxcore, 3.jqxwhateverplugin.That’s what RequireJS does under the hood by saying jqxcore has a dependency on jquery (ie: load jquery before jqxcore because jqxcore needs it), and jqxwhateverplugin has a dependency on both of those (ie: load both jqxcore and jquery because it needs both).
So the order of script loading is handled by RequireJS.In the same way I want it and would expect it to be handled by Webpack, but clearly it doesn’t.
Or at least not the way I’m trying.Let me be clear: I do NOT want to be including manual script tags on any pages.
There should be a way to tell Webpack it needs to load jqxcore and jquery first when requireing jqxwhateverplugin, just the way RequireJS does.
Otherwise what’s the point…So how does one go about doing that :)?
-
AuthorPosts