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

Similar functionality of curl with require.js map config? #277

Open
margaritis opened this issue Aug 2, 2014 · 1 comment
Open

Similar functionality of curl with require.js map config? #277

margaritis opened this issue Aug 2, 2014 · 1 comment

Comments

@margaritis
Copy link

I am trying to redirect all calls of jquery to another script which returns the noConflict version of jquery.

The reason for this approach is because i am using flight.js.

My current map config is a follows:

map: {
         '*': { 
             'jquery': 'jquery-private' 
         },
         'jquery-private': { 
             'jquery': 'jquery' 
         }
}

Is there a way to have the same setup in curl.js

P.S. The wiki contains a page about mapping but i am not sure if the functionality exists.

@unscriptable
Copy link
Member

Hello @kmargaritis,

It seems strange that flight would require something like this. I just peeked at the flight README and it gives very bad advice. You should not load jquery using a script tag when using any AMD loader. Perhaps this is what is causing the strange configuration?

Fwiw, curl.js does not allow multiple versions of a package at the same time via config. You can do it with a combination of config and a bit of code, which might be what jquery-private is doing already? What does jquery-private do, exactly (share code)?

-- John

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

2 participants