cssninjaStudio / unplugin-fonts

Universal Webfont loader - Unfonts - based on https://web.dev/optimize-webfont-loading/
MIT License
334 stars 24 forks source link

[Bug]: Vite custom font scanning all available font files including node_modules #74

Open chunlampang opened 2 weeks ago

chunlampang commented 2 weeks ago

Describe the feature

Since there are some font files (e.g. icon font) already handled by other plugin, unplugin-fonts is no need to inject those files. It just need to inject the configurated fonts instead of inject every available font files inside the build. It is suggested that adding an option to disable control custom font.

Update - it is a bug

Vite custom font scanning all available font files including node_modules file on build

chunlampang commented 6 days ago

Are the following code repeated? https://github.com/cssninjaStudio/unplugin-fonts/blob/a7e66d594e2c7e0a2cccfed7c15a069ffebb96c1/src/index.ts#L92-L102 https://github.com/cssninjaStudio/unplugin-fonts/blob/a7e66d594e2c7e0a2cccfed7c15a069ffebb96c1/src/index.ts#L126-L136