Skip to content
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

【vite-plugin-font】能否支持import分包后的字体路径 #138

Open
rylwl opened this issue Jan 12, 2025 · 1 comment
Open

【vite-plugin-font】能否支持import分包后的字体路径 #138

rylwl opened this issue Jan 12, 2025 · 1 comment

Comments

@rylwl
Copy link

rylwl commented Jan 12, 2025

我这边的场景是在首屏加载的时候希望通过link的preload预加载首屏的字体,但是发现好像不知道怎么获取分包后的路径填到link的href属性

@KonghaYao
Copy link
Owner

@rylwl 这个是交由 Vite 或者 Webpack 决定的。对于 vite-plugin-font 来说,只是生成了一份 CSS 给这个编译器,但是不知道 CSS 最终会注入到哪里

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants