Bun

Bun issue (Nov 27): Bun Build Minify-Syntax Inlines Dynamic Imports and Breaks Optional Peers

medium

Is it fixed? Not yet.

Ongoing since Nov 27, 21:37 UTC. First reported Nov 27, 21:37 UTC.

What happened

Bun's bundler incorrectly resolves const specifiers in dynamic import() when using syntax minification flags like --minify-syntax, --minify, or --compile --minify. This causes builds to fail for packages that hide optional peer dependencies behind variables. The bug reproduces on versions 1.4.5 and 1.4.6-canary.

What caused it?

--minify-syntax inlines a const string into a dynamic import() and the bundler resolves the inlined specifier as if it were a literal, failing on packages hiding optional peers behind variables.

Source: github.com

No verified workaround yet

None of the linked reports describe a mitigation. This page updates when one appears.

Official fix

Outage timeline

  1. Investigating(current)
  2. Workaround available(upcoming)
  3. Resolved(upcoming)
  1. First report on GitHub issue

    bun build --minify-syntax resolves a dynamic import() whose specifier is a const, failing builds that hide optional peers

    Source

Reports of this outage

1 report · 1 GitHubShow
  1. [1]
    GitHub First report
    bun build --minify-syntax resolves a dynamic import() whose specifier is a const, failing builds that hide optional peers(opens GitHub issue in a new tab)

    What version of Bun is running? 1.4.5+a7733435c (also reproduces on 1.4.5-canary.20261127.1, which reports 1.4.6) What platform is your computer? Linux 6.18.62-127.179.amzn2023.aarch64 aarch64 aarch64 What steps can reproduce the bug? --minify-syntax (and so --minify and --compile --minify) inlines a const string into a dynamic import(), and the bundler then resolves the inlined specifier as if it had been a literal. A package that hides an optional peer behind a variable so bundlers leave it…

    by brandon-julio-t 0upvotes 1comments

Bun issue FAQ

What happened in the Bun issue, and why?

Ongoing since Nov 27, 21:37 UTC. The cause: --minify-syntax inlines a const string into a dynamic import() and the bundler resolves the inlined specifier as if it were a literal, failing on packages hiding optional peers behind variables.

What is affected by the Bun issue?

Bun.

When did the Bun issue start and end?

It started Nov 27, 21:37 UTC and is still ongoing (2 h 34 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 1 report from 1 independent source.