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 hoist of modules with multiple aliases #2077

Merged
merged 3 commits into from Oct 6, 2018
Merged

Conversation

fathyb
Copy link
Contributor

@fathyb fathyb commented Sep 29, 2018


name: Fix hoist of modules with multiple aliases

↪️ Pull Request

When a module has multiple aliases it can get trimmed from the output, triggering reference errors at runtime.

💻 Examples

parcel build a.js --experimental-scope-hoist && node dist/a.js

  • a.js
require('to-function')
  • output
  output = ($BDJ7$init(), {});
  ^

ReferenceError: $BDJ7$init is not defined

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions
  • Included links to related issues/PRs

Can be reproduced using the `to-function` package
devongovett
devongovett previously approved these changes Oct 6, 2018
@devongovett devongovett merged commit adf49c2 into master Oct 6, 2018
@devongovett devongovett deleted the fix/wrap-aliases branch October 6, 2018 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants