Load shim from package name if no shim for moduleName. #331

Merged
merged 3 commits into from Jan 9, 2013

Conversation

Projects
None yet
2 participants
@maxpeterson
Contributor

maxpeterson commented Dec 11, 2012

This is a possible fix for jrburke/r.js#310

The idea is to try and get the the shim for a module based on the package name in the case that the module name includes packageConfig.main.

In the case that you have a package

  {
      "name": "backbone",
      "location": "jam/backbone",
      "main": "backbone.js"
  }

then it would try and get shim['backbone'] if there was no shim['backbone/backbone']

jrburke added a commit that referenced this pull request Jan 9, 2013

jrburke added a commit that referenced this pull request Jan 9, 2013

@jrburke jrburke merged commit a609335 into requirejs:master Jan 9, 2013

@jrburke

This comment has been minimized.

Show comment
Hide comment
@jrburke

jrburke Jan 9, 2013

Member

Thank you, merged. You can try latest master snapshot to confirm the fix:
https://raw.github.com/jrburke/r.js/master/dist/r.js

Member

jrburke commented Jan 9, 2013

Thank you, merged. You can try latest master snapshot to confirm the fix:
https://raw.github.com/jrburke/r.js/master/dist/r.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment