-
-
Couldn't load subscription status.
- Fork 28
Closed
Description
This code transpiled by Babel does not detect the re-export:
export {named} from './named';
export * from './re-export';Looking at the test-cases I see that this re-export alone is supported:
exports.__esModule = true;
var _reExport = require("./re-export");
Object.keys(_reExport).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _reExport[key]) return;
exports[key] = _reExport[key];
});The code above correctly detects ./re-export. However, adding an extra named export changes the output slightly
exports.__esModule = true;
var _exportNames = {
named: true
};
exports.named = void 0;
var _named = require("./named");
exports.named = _named.named;
var _reExport = require("./re-export");
Object.keys(_reExport).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _reExport[key]) return;
exports[key] = _reExport[key];
});Runing this code through the lexer returns { exports: [ '__esModule', 'named' ], reexports: [] }, ./re-export was not detected
Metadata
Metadata
Assignees
Labels
No labels