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: rewriteBindingInitVisitor should skip on scopable node #10764

Merged
merged 1 commit into from Nov 26, 2019

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Nov 25, 2019

Q                       A
Fixed Issues? Fixes #9346
Patch: Bug Fix? Yes
Tests Added + Pass? Yes
License MIT

The rewriteBindingInitVisitor is used in module transform helper to inject exports statement after ExportDeclaration. Since ExportDeclaration is only allowed in top-level scope, it should skip when it visits a scopable node. Therefore the Function and ClassProperty visitor should be replaced by Scope visitor.

This issue impacts all module related transforms.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: modules labels Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: modules outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plugin-transform-modules-amd handles extra scopes incorrectly
3 participants