Description
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 the manifest.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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.