7

When setting the path for jQuery, whenever I am using:

require.config({
    paths: {
        'jQuery': './libs/jquery-1.8.0.min'
    }
});

Then:

define(['jQuery'], function($) {
    console.log($);
};

$ is gonna be undefined.

However if I am using:

require.config({
    paths: {
        'jquery': './libs/jquery-1.8.0.min'
    }
});

Then:

define(['jquery'], function($) {
    console.log($);
};

Everything is working great all in a sudden.

What's the issue with defining jQuery's alias with jQuery?

1
  • 1
    I wish I had found this question 2 hours ago... Commented Aug 29, 2013 at 16:34

1 Answer 1

9

This was discussed more over here: https://github.com/jrburke/requirejs/issues/435

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.