Open codehz opened 11 months ago
1.0.15+b3bdf22eb
Darwin 23.1.0 arm64 arm
https://replit.com/@codehz/bun-build-bug-repro
//a.ts export const a = 1; import("./b") //b.ts import { a } from "./a" export const b = a; //index.ts Bun.build({ entrypoints: ["./a.ts", "./b.ts"], outdir: "./dist", })
no runtime error
output a.js:
var __create = Object.create; var __defProp = Object.defineProperty; var __getProtoOf = Object.getPrototypeOf; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __toESM = (mod, isNodeMode, target) => { target = mod != null ? __create(__getProtoOf(mod)) : {}; const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target; for (let key of __getOwnPropNames(mod)) if (!__hasOwnProp.call(to, key)) __defProp(to, key, { get: () => mod[key], enumerable: true }); return to; }; var __require = (id) => { return import.meta.require(id); }; // a.ts var a = 1; import("./b.js"); export { a }; export { a };
No response
In fact, it doesn't even need to be circular: https://replit.com/@topper2/bun-build-bug-repro-no-circular#dist-c/c.js
What version of Bun is running?
1.0.15+b3bdf22eb
What platform is your computer?
Darwin 23.1.0 arm64 arm
What steps can reproduce the bug?
https://replit.com/@codehz/bun-build-bug-repro
What is the expected behavior?
no runtime error
What do you see instead?
output a.js:
Additional information
No response