Skip to content

Fix hoist of modules with multiple aliases#2077

Merged
devongovett merged 3 commits into
masterfrom
fix/wrap-aliases
Oct 6, 2018
Merged

Fix hoist of modules with multiple aliases#2077
devongovett merged 3 commits into
masterfrom
fix/wrap-aliases

Conversation

@fathyb

@fathyb fathyb commented Sep 29, 2018

Copy link
Copy Markdown
Contributor

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.

2 participants