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

Problem with global external dependency #15

Closed
wants to merge 1 commit into from

Conversation

parroit
Copy link
Contributor

@parroit parroit commented Nov 19, 2014

I'm trying to use global external dependency via external option.
I got two problem:

  1. modules declared as external could not be found by node_resolve, and it throws an exception. I solved this adding exports.getNodePathExternal in pathUtils.js. This solve my problem, but I doubt that could be by accident (I think an external module should not be passed to node_resolve at all, but I was not able to find a way)

  2. ast generated for global external module was rendered as

function (module, exports) {
     return __external_modulename;
},

while the correct code is:

function (module, exports) {
     module.exports = __external_modulename;
},

But please confirm that this change doesn't break amd external...

@RReverser
Copy link
Owner

Yes, I currently got the same problem and testing it right now. Will be published soon.

@RReverser
Copy link
Owner

Just published fix. Please check if it fixes your issue, too.

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

Successfully merging this pull request may close these issues.

2 participants