Skip to content

Instantly share code, notes, and snippets.

@Ianfeather
Last active January 2, 2016 02:59
Show Gist options
  • Save Ianfeather/8240922 to your computer and use it in GitHub Desktop.
Save Ianfeather/8240922 to your computer and use it in GitHub Desktop.
r.js path switching
// Is there a way to change a path for a specific module during the r.js build process?
// So that a module with a dependency of 'jquery' can be used with two versions?
// I have tried to show what I would be after with lines 16-18
({
baseUrl: "./",
paths: {
"jquery": "jquery/jquery-2.0"
},
modules: [
{
"name": "app/modern"
},
{
"name": "app/legacy",
"paths": {
"jquery": "jquery/jquery-1.10"
}
}
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment