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

fix(nmf): Fix exports for var injection to include free glob export or args #3971

Merged
merged 3 commits into from
Jan 16, 2017

Conversation

TheLarkInn
Copy link
Member

What kind of change does this PR introduce?
Bugfix.

Did you add tests for your changes?
N/A

If relevant, link to documentation update:
N/A

Summary
Patches issue discovered in RC5. exportArguments should be tried first before "exports".

Does this PR introduce a breaking change?
No

Other information
Fixes #3917

@TheLarkInn
Copy link
Member Author

Also fixed #3974

varStartCode += "/* WEBPACK VAR INJECTION */(function(" + varNames.join(", ") + ") {";
// exports === this in the topLevelBlock, but exports do compress better...
varEndCode = (topLevelBlock === block ? "}.call(exports, " : "}.call(this, ") +
varEndCode = (topLevelBlock === block ? "}.call(module.exportsArgument || 'exports', " : "}.call(this, ") +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'exports' string? Is that right? Sorry if that's intentional.

@sokra sokra merged commit e9bdb05 into master Jan 16, 2017
@sokra sokra deleted the bugfix/fix_available_vars_in_fmtp branch January 16, 2017 02:47
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.2.0-rc.4's es6 modules' "module" usage detection seems to be broken
3 participants