-
Notifications
You must be signed in to change notification settings - Fork 155
fix: assert compilation errors in OutputPlugin #1333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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 detectedLatest commit: a6c24b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
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 |
|
@OrfeasZ is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
jbroma
left a comment
There was a problem hiding this 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 👍
|
@OrfeasZ please also fix the existing lint / test issues as well 👍 |
|
@jbroma Done! |
|
Oops, looks like I missed something and it was passing locally because of some stale files. Should be fixed now. |
Previously, the
RepackOutputPluginwould always assume compilation had succeeded. Thedonehook 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 aboutindex.bundlenot 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).