diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
| commit | efbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch) | |
| tree | 2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/@babel/plugin-transform-modules-systemjs/lib/index.js | |
| parent | 43acceb75957c880a5ba5a31aae221394a36d5f6 (diff) | |
node fixes, updates
Diffstat (limited to 'node_modules/@babel/plugin-transform-modules-systemjs/lib/index.js')
| -rw-r--r-- | node_modules/@babel/plugin-transform-modules-systemjs/lib/index.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/node_modules/@babel/plugin-transform-modules-systemjs/lib/index.js b/node_modules/@babel/plugin-transform-modules-systemjs/lib/index.js index 8dcf410a..49cfbe13 100644 --- a/node_modules/@babel/plugin-transform-modules-systemjs/lib/index.js +++ b/node_modules/@babel/plugin-transform-modules-systemjs/lib/index.js @@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; exports.getExportSpecifierName = getExportSpecifierName; var _helperPluginUtils = require("@babel/helper-plugin-utils"); -var _helperHoistVariables = require("@babel/helper-hoist-variables"); var _core = require("@babel/core"); var _helperModuleTransforms = require("@babel/helper-module-transforms"); var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); @@ -349,12 +348,16 @@ var _default = exports.default = (0, _helperPluginUtils.declare)((api, options) }); let moduleName = (0, _helperModuleTransforms.getModuleName)(this.file.opts, options); if (moduleName) moduleName = _core.types.stringLiteral(moduleName); - (0, _helperHoistVariables.default)(path, (id, name, hasInit) => { + { + var _path$scope, _path$scope$hoistVari; + (_path$scope$hoistVari = (_path$scope = path.scope).hoistVariables) != null ? _path$scope$hoistVari : _path$scope.hoistVariables = require("@babel/traverse").Scope.prototype.hoistVariables; + } + path.scope.hoistVariables((id, hasInit) => { variableIds.push(id); - if (!hasInit && name in exportMap) { - for (const exported of exportMap[name]) { + if (!hasInit && id.name in exportMap) { + for (const exported of exportMap[id.name]) { exportNames.push(exported); - exportValues.push(scope.buildUndefinedNode()); + exportValues.push(_core.types.buildUndefinedNode()); } } }); |
