Closed mzahor closed 9 years ago
This totally fixes my issues with loading React. Please merge this in!
@mzahor thnx for the PR. I can see the bug and I do agree that it needs to be fixed. Unfortunately I can't merge your PR in the current form as it:
I would be happy to review & merge your PR as soon as the above is sorrected.
@jedmao if you want to help you are welcomed to review a PR, add missing tests etc. As noted above I can't merge this one in its current form.
Nevermind. Turns out simply adding his branch in my package.json was the true fix to my problem. Perhaps I'll open another issue about that.
@mzahor are you planning to send update to this PR based on my comments? If not I'm going to fix the underlying bug over the weekend.
Sorry for late response. I've created another pull request based on your comments.
This one is suppressed by #41
Fixes bug with loading npm modules if relative path is used in package.json. For example see this part of package.json: { ... "main": "./moment.js", ... }
commonjs bridge will try to match it with loaded file in the following line: if (existingfiles[paths[i]]) { and fail since paths[i] will be smth like basepath/node_modules/moment/moment/./moment.js but in existing files it will be basepath/node_modules/moment/moment/moment.js