0

I use a third-party theme, initially the theme included Jquery through default_head_blocks.xml. I wanted to use requireJS instead and I removed Jquery from default_head_blocks.xml.

Now I have this error:

jQuery is not defined

I found that jquery is loaded after his plugins. How can I load jquery just after requirejs-config.js ?

enter image description here

0

You have to include Jquery as a dependecy of all your scripts that require it. How are they included?

If these are AMD modules you must have, for example in in.js:

define(['jquery'], function($){

     // The script

});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.