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
Tree shake icons #7051
Tree shake icons #7051
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -23,6 +23,7 @@ | |||
"@radix-ui/react-popover": "^1.0.2", | |||
"@radix-ui/react-portal": "^1.0.0", | |||
"@radix-ui/react-select": "^0.1.1", | |||
"@react-icons/all-files": "^4.1.0", |
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.
Added so we can import individually after transform
Very nice @zomars! I’m only wondering if we still need to have the icons file in our repo, since we directly map this to npm now? Although I can imagine that typescript would get confused if we’d import from a file that doens’t exist. Apart from that a great change! Let me know when it’s out of draft. |
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.
nice new next 13.1 feature 🥰
@@ -1,3 +1,4 @@ | |||
import { StarIcon as StarIconSolid } from "@heroicons/react/solid"; |
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.
Here is room for improvement, though, as we're including from a specific library again beyond the abstraction. NIT as we use so little hero-icons. I think you've looked into this already and this was not possible.
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.
Yes, a good follow up would be to get rid of heroicons for good
Have had a look at the comment @JeroenReumkens left; if what he's seeing is correct and tree shaking is already happening, I would argue this PR needlessly complicates the setup. |
isnt this ready to merge? seems pretty good to me + approved by two people @zomars |
Waiting on bundle analyzer to give us the final veredict |
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Sixty-eight Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
Current Playwright Test Results Summary✅ 53 Passing - ❌ 1 Failing Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 03/02/2023 08:15:55pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 6e0377c Started: 03/02/2023 08:11:18pm UTC ❌ Failures📄 apps/web/playwright/event-types.e2e.ts • 1 FailureTest Case Results
|
* Attempt to tree shake icons * Tree shaking icons
What does this PR do?
Adds tree shaking support four our UI icons. Taken from here.
https://react-icons.github.io/react-icons/
Environment: Staging(main branch) / Production
Type of change