fix: rewriteBindingInitVisitor should skip on scopable node (#10764)

This commit is contained in:
Huáng Jùnliàng
2019-11-26 02:51:11 -05:00
committed by Nicolò Ribaudo
parent 7f732ad019
commit 4e774b7264
4 changed files with 24 additions and 4 deletions

View File

@@ -80,10 +80,7 @@ export default function rewriteLiveReferences(
* A visitor to inject export update statements during binding initialization.
*/
const rewriteBindingInitVisitor = {
ClassProperty(path) {
path.skip();
},
Function(path) {
Scope(path) {
path.skip();
},
ClassDeclaration(path) {

View File

@@ -0,0 +1,4 @@
export function bug() {}
{
let bug = 2;
}

View File

@@ -0,0 +1,5 @@
{
"plugins": [
"transform-modules-amd"
]
}

View 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;
}
});