Skip to content
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

refactor(repack): use done hook inside of OutputPlugin #515

Merged
merged 8 commits into from
Mar 8, 2024

Conversation

jbroma
Copy link
Member

@jbroma jbroma commented Mar 5, 2024

Summary

Migrated OutputPlugin to run only inside of done hook - this enables usage of OutputPlugin with rspack as previous approach utilised features not available in rspack yet(?)

Test plan

  • - updated tests pass
  • - output is the same as before

Copy link

changeset-bot bot commented Mar 5, 2024

🦋 Changeset detected

Latest commit: b815dc0

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

This PR includes changesets to release 2 packages
Name Type
@callstack/repack Patch
testerapp 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

@jbroma jbroma changed the title refactor: use done hook inside of OutputPlugin refactor(repack): use done hook inside of OutputPlugin Mar 5, 2024
Copy link
Member

@RafikiTiki RafikiTiki left a comment

Choose a reason for hiding this comment

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

LGTM!

@jbroma
Copy link
Member Author

jbroma commented Mar 8, 2024

one thing of note: there are few cases in this PR where I was forced to use non-null assertion operator, but newest webpack 5.90.3 introduced some improved typings for stats.toJson() so we might be able to fix it in a sensible way in a separate PR.

@RafikiTiki RafikiTiki merged commit 141d142 into v4 Mar 8, 2024
3 checks passed
@RafikiTiki RafikiTiki deleted the refactor-output-plugin branch March 8, 2024 13:53
jbroma added a commit that referenced this pull request Apr 5, 2024
* move output path check to the beginning

* feat: move final phase to done hook

* feat: use sourcemap file directly instead of extracting from compilation

* refactor: move chunk classifying to done hook

* refactor: finish migration to done hook

* fix: tests & typescript issues

* chore: add changeset

* refactor: rename chunks to statsChunkMap
jbroma added a commit that referenced this pull request Apr 5, 2024
* move output path check to the beginning

* feat: move final phase to done hook

* feat: use sourcemap file directly instead of extracting from compilation

* refactor: move chunk classifying to done hook

* refactor: finish migration to done hook

* fix: tests & typescript issues

* chore: add changeset

* refactor: rename chunks to statsChunkMap
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