fix: rewriteBindingInitVisitor should skip on scopable node (#10764)
This commit is contained in:
committed by
Nicolò Ribaudo
parent
7f732ad019
commit
4e774b7264
4
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/input.mjs
vendored
Normal file
4
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/input.mjs
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export function bug() {}
|
||||
{
|
||||
let bug = 2;
|
||||
}
|
||||
5
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/options.json
vendored
Normal file
5
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/options.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"plugins": [
|
||||
"transform-modules-amd"
|
||||
]
|
||||
}
|
||||
14
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/output.js
vendored
Normal file
14
packages/babel-plugin-transform-modules-amd/test/fixtures/regression/9346/output.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
define(["exports"], function (_exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(_exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
_exports.bug = bug;
|
||||
|
||||
function bug() {}
|
||||
|
||||
{
|
||||
let bug = 2;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user