-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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: remove svgr/webpack from deps of new project #5703
Conversation
✔️ [V2] 🔨 Explore the source changes: 5f4bcc7 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/6167e602ed62860008144713 😎 Browse the preview: https://deploy-preview-5703--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5703--docusaurus-2.netlify.app/ |
Size Change: -4 B (0%) Total Size: 841 kB ℹ️ View Unchanged
|
Yarn 3 PnP mode 🤪
It is more strict about deps, and it is needed to be able to use Code in site can only use deps declared by site. I'd also like to remove file-loader in the future Should be solved by migrating to Webpack assets, but not sure how to do that properly yet: #4708 |
Thanks for the explanation, alright, let's wait then.. FYI, new version of svgr is released (https://github.com/gregberge/svgr/commits/main), although it is alpha version, in theory we can used it for now, or PnP will prevent this? Also updating to new version of svgr should fix this warning:
|
* changelog https://github.com/gregberge/svgr/releases * SVGO 2 changelogg https://github.com/svg/svgo/releases/tag/v2.0.0 * depend on maintained svgo version * although svgr 6 is in alpha, it fixes a few issues with webpack 5 (gregberge/svgr@1a8cc98) and React (gregberge/svgr@3700aba) * see also facebook#5703
* svgr changelog https://github.com/gregberge/svgr/releases * SVGO 2 changelog https://github.com/svg/svgo/releases/tag/v2.0.0 * depend on maintained svgo version * although svgr 6 is in alpha, it fixes a few issues with webpack 5 (gregberge/svgr@1a8cc98) and React (gregberge/svgr@3700aba) * see also facebook#5703
* chore: update @svgr/webpack to version 6 * svgr changelog https://github.com/gregberge/svgr/releases * SVGO 2 changelog https://github.com/svg/svgo/releases/tag/v2.0.0 * depend on maintained svgo version * although svgr 6 is in alpha, it fixes a few issues with webpack 5 (gregberge/svgr@1a8cc98) and React (gregberge/svgr@3700aba) * see also #5703 * Fix config * fix e2e test * Fix again * Update to stable Co-authored-by: Josh-Cena <sidachen2003@gmail.com>
Closing in favor of #6047. We just need to load these loaders with |
Motivation
I don't really understand why svgr/webpack dependency is added right now when initializing new project, since it already used in the core package, so why duplicate it then?
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Test release.
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)