user294095
user294095

Reputation: 11

Namespace RequireJS in JS API to avoid conflicts with 3rd party AMD libraries

I want to include jquery and jquery UI along with requirejs( at top of the header ).

with WordPress starting to utillize dynamic module loading and React, primarily in its administrative dashboard and content editing experience, this became impossible. I am experiencing constant issues where dynamically loaded jQuery UI components are being picked up by RequireJS which attempts to load them within its own scope. Under this condition, RequireJS fails and jQuery UI does not load in the global scope as expected.

this is the exact issue check console on your local

Console screenshot can anyone solve it? thanks in advance!..

<script src='http://requirejs.org/docs/release/2.1.18/minified/require.js'></script>
<script src='http://code.jquery.com/jquery-1.11.3.min.js'></script>
<script src='http://code.jquery.com/ui/1.11.4/jquery-ui.min.js'></script>

Upvotes: 1

Views: 61

Answers (0)

Related Questions