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

Don't merge: Demonstrate dual package hazard #1002

Closed
wants to merge 18 commits into from

Conversation

timostamm
Copy link
Member

@timostamm timostamm commented Sep 29, 2023

This example demonstrates the dual package hazard and verifies the fix by connectrpc/connect-es#842.

For a repeatable example for the dual package hazard with various consumers see here.
For tree-shaking tests with various bundlers see here.

@timostamm timostamm changed the title Demonstrate dual package hazard Don't merge: Demonstrate dual package hazard Sep 29, 2023
@timostamm timostamm marked this pull request as ready for review September 29, 2023 13:28
@timostamm timostamm requested a review from smaye81 September 29, 2023 13:28
@timostamm
Copy link
Member Author

@smaye81, can you take a look? From the code size benchmark in connect-es, tree-shaking in esbuild works, but it would be good to have confidence that that's also true for other bundlers like webpack and parcel.

@timostamm
Copy link
Member Author

Thanks @smaye81 and @paul-sachs.

I've moved the tree-shaking tests out to a separate project here, and added bundlers to the dual package hazard example here.

The results with the fix from connectrpc/connect-es#842 are:

  • no dual package hazard with any consumer (no FAIL with bash test.bash)
  • tree shaking results are exactly the same (no diff after bash test.bash)

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.

3 participants