-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Avoid importing the whole of react-icons
(if treeshaking is broken)
#3046
Conversation
@fregante FYI, the v4 branch is locked and soon the |
@fregante |
Tests for what? This only affects builds. To test this one would have to set up a webpack build and set a size limit. |
ah, right... well as long as the build still runs then you are ok. You will need to rebase and resolve conflicts |
It should be good to go now, but the lockfile has conflicts again, so maybe it's best to resolve them and merge the PR when you're ready, otherwise I have to resolve them daily. Also the |
@fregante I can't update your PR since it is on your fork... I can however upload the |
Are you running node 16? I do know that |
You should be able to push any changes: This is the issue I get:
I tried again by checking out the lockfile from master and running |
@fregante ➜ /workspaces/react-jsonschema-form (patch-1) $ npm --version
node --version
7.24.2
@fregante ➜ /workspaces/react-jsonschema-form (patch-1) $ node --version
v16.14.2 |
Also, if this passes, can you update the |
Sorry I cannot make any changes, I even tried it on my computer (macOS) and |
I still can't make changes so here are the updated snapshots |
Co-Authored-By: Heath C <[email protected]>
You're definitely allowed to considering you just pushed 33f4115 to my repo 😁 https://github.com/fregante/react-jsonschema-form/commits/patch-1 See
Thank you! Committed |
@fregante Go ahead and merge, unless you'd rather I do it |
done! |
🙌 |
Reasons for making this change
Due to the
bootstrap-4
package, my bundles end up with large chunks ofreact-icons
package, often being the largest import:This is a common issue with
react-icons
and apparently the solution is avoid the main package and use@react-icons/all-files
instead:The main package is set up for tree-shaking but it's not working for me, even if my bundler correctly tree-shakes
lodash-es
for exampleChecklist
npm run test:update
to update snapshots, if needed.