gatsby-plugin-preload-fonts - custom cache path #34379
Unanswered
giladsegal
asked this question in
Ideas / Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
gatsby-plugin-preload-fonts generates a cache file with a hardcoded name
font-preload-cache.json
. I want to make that file path configurable.That's my use-case: During the build process, I use environment variables, to generate two different versions of my website. All versions share common pages, but each version has a few unique pages. Currently, I can't set the path of
font-preload-cache.json
per website version so the plugin can only work with a single version of my website. To get around it I created the json files for both versions and merged them manually.This can be solved by:
gatsby-preload-fonts
scriptgatsby-plugin-preload-fonts
configuration in./gatsby-config.js
P.S
I can also contribute the code if you agree it has value.
Beta Was this translation helpful? Give feedback.
All reactions