-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Describe the bug
This is using the swc-linux-x64-gnu binary from the release page.
This is the command used:
./swc-linux-x64-gnu compile --config-file .swcrc --out-file index.js index.ts
The same command works just fine running swc through @swc/cli / @swc/core of the same version (as shown with the playground link).
Input code
export * from "./my-file";Config
{
"jsc": {
"externalHelpers": false
},
"module": {
"type": "commonjs"
}
}Link to the code that reproduces this issue
SWC Info output
No response
Expected behavior
Output should be:
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
_export_star(require("./my-file"), exports);
function _export_star(from, to) {
Object.keys(from).forEach(function(k) {
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
Object.defineProperty(to, k, {
enumerable: true,
get: function() {
return from[k];
}
});
}
});
return from;
}
Actual behavior
Output references @swc/helpers:
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _export_star = require("@swc/helpers/_/_export_star");
_export_star._(require("./my-file"), exports);
Version
1.15.18
Additional context
Use the binary from version v1.12.9 works with the same configuration.
It started breaking in v1.12.14
Reactions are currently unavailable