Css font imports in manifest.json #18392
Labels
enhancement
New feature or request
feat: build
p2-nice-to-have
Not breaking anything but nice to have (priority)
Description
Currently fonts are properly added to the
manifest.json
but you cannot see which e.g. css/vue files require this font.This makes automatic preloading difficult as we cannot determine which file requires the font, and IF we need to require the font for the initial page load.
https://stackblitz.com/edit/github-citlf9?file=package.json,src%2Findex.css&terminal=build
Suggested solution
I suggest adding an
imports
key to css files within themanifest.json
just like is done with JS.This may contain imported css (which is not relevant as everything currently gets compiled to a single css file)
and fonts required by the current css or vue file.
This way when (pre)loading the css or vue file, we know we should also (pre)load those font files
Alternative
Preloading of the fonts either needs to be done manually, or ALL fonts in the
manifest.json
must be loaded. Which isn't ideal since likely not all fonts are actually used on the current page.Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: