Bun issue (Dec 4): Bun Browser Target Inlines ~4.5 KB node:path Shim on Tree-Shaken Export
Is it fixed? Not yet.
Ongoing since Dec 4, 02:21 UTC. First reported Dec 4, 02:21 UTC.
What happened
Bun 1.4.6-canary.1+eb788fcfe inappropriately inlines an approximately 4.5 KB node:path shim when targeting browsers even if its only consumer export is tree-shaken, and also emits unused __toESM or __export runtime helpers in minified iife and cjs bundles.
What caused it?
Under active investigation. No report has identified a root cause yet.
No verified workaround yet
None of the linked reports describe a mitigation. This page updates when one appears.
Outage timeline
- Investigating(current)
- Workaround available(upcoming)
- Resolved(upcoming)
- First report on GitHub issue
[Bun.build] Browser target inlines ~4.5 KB node:path shim when its only consumer export is tree-shaken (even with external: ["node:path"])
Source
Reports of this outage
2 reports · 2 GitHubShow
- [1]GitHub First report[Bun.build] Browser target inlines ~4.5 KB node:path shim when its only consumer export is tree-shaken (even with external: ["node:path"])(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.6-canary.1+eb788fcfe What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? Run bun repro.ts: // repro.ts import { mkdtempSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; const dir = mkdtempSync(join(tmpdir(), "bun-path-shim-repro-")); try { writeFileSync( join(dir, "runtime.ts"), import { join } from "node:path"; export function…
by TejasMate 0upvotes 1comments
- [2]GitHub[Bun.build] Unused __toESM / __export runtime helpers emitted in minified format: "iife" and "cjs" bundles with exports(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.6-canary.1+eb788fcfe What platform is your computer? Microsoft Windows NT 10.0.26300.0 x64 What steps can reproduce the bug? Run the following reproduction script with bun: import { mkdir, rm } from "node:fs/promises"; import { join } from "node:path"; const dir = "./.tmp-bun-iife-repro"; await mkdir(dir, { recursive: true }); await Bun.write( join(dir, "helper.ts"), export function greet(name: string) { return "hello " + name; } export function…
by TejasMate 0upvotes 1comments94% match
Bun issue FAQ
What happened in the Bun issue, and why?
Ongoing since Dec 4, 02:21 UTC. No cause has been published yet; this page adds it once the vendor or a report explains it.
What is affected by the Bun issue?
Bun (versions: 1.4.6-canary.1+eb788fcfe).
When did the Bun issue start and end?
It started Dec 4, 02:21 UTC and is still ongoing (7 h 45 min so far). This page updates as it develops.
How do I get alerts for Bun?
Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed
Where does this information come from?
WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 2 reports from 1 independent source.