Does vite and rollup apply tree shaking on font icons?

564 Views Asked by At

I'm switching from Next.js to Qwik. One problem that I have for this migration, is material icons.

In Next, I could easily use MUI icons.

In Next, I use qwikify$ to use MUI icons, but they cause blanket rendering of components in the production.

I considered using Google Font Icon for this.

I know I can choose each icon and export its SVG. But I wonder if I include the font in my project and use icons there, does Vite and Rollup tree-shake the fonts too?

Because if they don't, then adding a huge font-icon just to use some icons is a very heavy overhead.

And if they do, then adding each icon individually as an SVG means slower development.

0

There are 0 best solutions below