Skip to content

fix: await main bundle generation - #3198

Open
OskarEichler wants to merge 1 commit into
iamkun:devfrom
OskarEichler:codex/await-main-rollup-build
Open

fix: await main bundle generation#3198
OskarEichler wants to merge 1 commit into
iamkun:devfrom
OskarEichler:codex/await-main-rollup-build

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Sep 1, 2026

Copy link
Copy Markdown

Breaking/build behavior changes

  • The build command now waits for the main Rollup bundle before copying types and generating locale.json.
  • A rejected main bundle build now reaches the existing top-level error handler instead of escaping as an unhandled promise rejection.
  • Runtime library behavior and output format are unchanged.
  • PR fix: fail builds after generation errors #3195 separately makes the existing error handler return a non-zero process status.

Problem

The final build(configFactory(...)) call was not awaited. Type copying and locale manifest generation could start while the main bundle was still pending, and the command's async workflow could finish without observing a rejected Rollup promise.

Fix

Await the main bundle build, matching the already-sequential locale and plugin builds.

A regression test holds the mocked Rollup promise open and verifies that locale manifest generation cannot begin until the main bundle resolves.

Verification

  • npm test — 94 suites, 795 tests passed
  • npm run lint
  • NODE_OPTIONS=--openssl-legacy-provider npm run build
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant