-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
chore: make dependencies external #977
chore: make dependencies external #977
Conversation
@GerkinDev thanks for this PR, we really appreciate it! About the folder |
@GerkinDev just released a beta version for this PR:
or
|
Docs site work without problem after the modification locally. Since I don't have an easy boilerplate to compare bundle size with @floating-ui already used or not, I did not get you final bundle results in demo app. Yet, I'm confident it should not cause additional problems. I also noticed that packages target multiple versions of react: Lines 75 to 76 in 13542f6
react-tooltip/docs/package.json Lines 24 to 25 in 13542f6
While it does not prevent the docs site from building in the current state, it might cause troubles Final note: lockfiles weren't changed, since I don't use neither yarn nor npm. I suggest you do a commit atop this PR with lockfile changes before merging it, if/when you plan to do it |
Yeah, just delete it. |
I don't think this should ever be a problem. The component targets react 16 so that older projects can still use the tooltip. |
As a side note, why is bundlephobia not detecting https://bundlephobia.com/package/[email protected] Here's kind of how it should look like, comparing with another package https://bundlephobia.com/package/@floating-ui/[email protected] |
Yeah, good question 🤔 |
Ah I think I understand why: it seems to get the size of |
Might you try a new alpha release from latest commit ? I did not find anything in the bundlephobia repo to explain how composition is calculated. If this does not work, then I would suppose it relies on lockfiles |
9dc0f79
to
7cb9d92
Compare
7cb9d92
to
930221d
Compare
930221d
to
ab449c4
Compare
|
Looks good to me but are you sure this will close the open issue @GerkinDev? I'm just double-checking :) |
I'm confident about it but as mentioned above I did not have the time to fact-check in situ by inspecting manually a prod build of a demo app comparing following situations:
|
Sample app attached along with individual reports: test-app.zip
Looks good to me ;) |
Thanks for confirming @GerkinDev! |
just waiting for @gabrieljablonski |
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.
👍
@GerkinDev I'll merge this one now but I want to run some tests locally related to building that is breaking next.js apps with SWC active, so we will do a new release as soon as possible. Thank you so much for this contribution! |
build: rollup port of #977
Closes #974
Dependencies used at runtime were moved in peer dependencies. Package.json is read in order to extract dependencies to make external.
Size changes results
This PR is marked as draft because I could not get
example-v5
to work from main in order to tweak it and compare its dist bundle in situ. I could use some help just to make sureexample-v5
works correctly before the PR