Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using map config to swap jquery with a jquery-config does not work. #277

Closed
jrburke opened this issue May 24, 2012 · 0 comments
Closed

Using map config to swap jquery with a jquery-config does not work. #277

jrburke opened this issue May 24, 2012 · 0 comments
Milestone

Comments

@jrburke
Copy link
Member

jrburke commented May 24, 2012

This is with the dev2.0 branch, from @ryanfitzer:

#255 (comment)


I'm stumped. I've tried the map feature every which way I can think up with no luck. I have a dev2.0 branch of the codebase as an example.

The way it's currently organized is the top level file (home.js) set's the config like so:

{
paths: {
'jquery': 'modules/jquery'
},

map: {

    '*': {
        'jquery': 'wrappers/jquery-config'
    },

    'wrappers/jquery-config': {
        'jquery': 'jquery'
    }
}

}

home.js also declares jquery as a dependency and the factory logs out its arguments.

In wrappers/jquery-config.js I'm also declaring jquery as a dependency (so I can use `$.noConflict)

The result is that modules/jquery.js is successfully loaded, but jquery is passed as undefined in my factory's argumentsand I get the following error:

Uncaught Error: Load timeout for modules: jquery

Other ways I've tried result in no error and jquery successfully loading, but also being passed as undefined in the factory's arguments (in both home.js and wrappers/jquery-config.js).

Any idea what am I missing?

jrburke added a commit to requirejs/r.js that referenced this issue May 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant