This question already has an answer here:

I want to register and enqueue RequireJS before jQuery so that jQuery finds out RequireJS and register itself as the AMD module. How to achieve this?

marked as duplicate by birgire, Jack Johansson, cjbj, kraftner, Dave Romsey Jul 10 '17 at 19:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    I deleted my answer, after a quick search on this site afterwards and found out that @bonger had posted the same idea before here couple of years ago, that I had even already upvoted ;-) – birgire Jul 7 '17 at 10:42
  • Thanks for the tip! That's a mf hack. I will try it if my idea of unregistering jquery and registering it again with dependency on requirejs wont work. wp_deregister_script('jquery');wp_register_script('requirejs');wp_register_script('jquery'); – Marecky Jul 7 '17 at 13:44

If I understood you correctly:

This might help you out: Using requirejs with wordpress

If you are just trying to enqueue requirejs with jquery:

Look at this documentation: Wordpress Enqueue Scripts Documentation

So in your case it would look something like this:

wp_enqueue_script( 'script', get_template_directory_uri() . 'PATH TO YOUR REQUIREJS FILE', array ( 'jquery' ), 1.1, true);

  • I prefer help from more readable people with an open mind that will easily guess what the author meant. – Marecky Jul 7 '17 at 13:45

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