Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: rewriteBindingInitVisitor should skip on scopable node (#10764)
- Loading branch information
1 parent
7f732ad
commit 4e774b7
Showing
4 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export function bug() {} | ||
{ | ||
let bug = 2; | ||
} |
5 changes: 5 additions & 0 deletions
5
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"plugins": [ | ||
"transform-modules-amd" | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
define(["exports"], function (_exports) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bug = bug; | ||
|
||
function bug() {} | ||
|
||
{ | ||
let bug = 2; | ||
} | ||
}); |