Skip to content

Conversation

@OrfeasZ
Copy link

@OrfeasZ OrfeasZ commented Jan 26, 2026

Previously, the RepackOutputPlugin would always assume compilation had succeeded. The done hook gets fired even after compilation finishes with errors, which would cause the plugin to try to copy around chunks that haven't been written to disk (due to said errors), resulting in cryptic errors about index.bundle not being found. This change adds a check for compilation errors, and aborts the bundling process if it finds any.

This likely "fixes" #1296 (or at least makes what's happening clearer).

Previously, the RepackOutputPlugin would always assume compilation had succeeded. The `done` hook gets fired even after compilation finishes with errors, which would cause the plugin to try to copy around chunks that haven't been written to disk (due to said errors), resulting in cryptic errors about `index.bundle` not being found. This change adds a check for compilation errors, and aborts the bundling process if it finds any.
@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

🦋 Changeset detected

Latest commit: a6c24b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack Patch
@callstack/repack-plugin-expo-modules Patch
@callstack/repack-plugin-nativewind Patch
@callstack/repack-plugin-reanimated Patch
@callstack/repack-dev-server Patch
@callstack/repack-init Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 26, 2026

@OrfeasZ is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@jbroma jbroma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thank you for the PR!

The change looks good, let's just add a test to packages/repack/src/plugins/__tests__/OutputPlugin.test.ts that verifies this behaviour and we should be G2G 👍

@jbroma
Copy link
Member

jbroma commented Feb 2, 2026

@OrfeasZ please also fix the existing lint / test issues as well 👍

@jbroma jbroma changed the title Check for compilation errors in OutputPlugin fix: assert compilation errors in OutputPlugin Feb 2, 2026
@OrfeasZ
Copy link
Author

OrfeasZ commented Feb 2, 2026

@jbroma Done!

@OrfeasZ
Copy link
Author

OrfeasZ commented Feb 2, 2026

Oops, looks like I missed something and it was passing locally because of some stale files. Should be fixed now.

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.

2 participants