From 2bcdbbc58215042a498e765da8deeee8ca71f064 Mon Sep 17 00:00:00 2001 From: Jhen-Jie Hong Date: Mon, 8 Jul 2024 17:21:31 +0800 Subject: [PATCH] Fix localName not defined in VariableDeclaration handler /cc @hans00 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 400af63..ab94750 100644 --- a/index.js +++ b/index.js @@ -115,7 +115,7 @@ module.exports = function ({ types: t }) { return t.variableDeclaration(path.node.kind, [ t.variableDeclarator( t.identifier(identifier.value.name), - isDefault(localName) + isDefault(identifier.key.name) ? t.memberExpression( t.callExpression(t.identifier('require'), [t.stringLiteral(distLocation)]), t.identifier('default')