Skip to content

Commit

Permalink
fix: rewriteBindingInitVisitor should skip on scopable node (#10764)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored and nicolo-ribaudo committed Nov 26, 2019
1 parent 7f732ad commit 4e774b7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
Expand Up @@ -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) {
Expand Down
@@ -0,0 +1,4 @@
export function bug() {}
{
let bug = 2;
}
@@ -0,0 +1,5 @@
{
"plugins": [
"transform-modules-amd"
]
}
@@ -0,0 +1,14 @@
define(["exports"], function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.bug = bug;

function bug() {}

{
let bug = 2;
}
});

0 comments on commit 4e774b7

Please sign in to comment.