We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 800084c commit 65c6f41Copy full SHA for 65c6f41
packages/repl/src/lib/workers/bundler/plugins/commonjs.ts
@@ -42,6 +42,9 @@ const plugin: Plugin = {
42
context.next();
43
},
44
AssignmentExpression: (node, context) => {
45
+ // walk children to find nested requires
46
+ context.next();
47
+
48
if (node.operator !== '=') return;
49
if (node.left.type !== 'MemberExpression') return;
50
if (node.left.object.type !== 'Identifier' || node.left.object.name !== 'exports') return;
@@ -53,8 +56,6 @@ const plugin: Plugin = {
53
56
`export const ${node.left.property.name} = module.exports.${node.left.property.name};`
54
57
);
55
58
}
-
- context.next();
59
60
});
61
0 commit comments