-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-plugin-preload-fonts] Add option to skip checking if fonts change - to use in CI #20185
Comments
We do have I honestly am not quite sure the why we even need to prompt user in the first place. @superhawk610 can you provide some context around this? This get's prompted when hash matches so instinctively I would say that not re-reunning should be default (unless there are subtle things that don't quite work, which I'm not aware of). I tried to look over discussion in #14608 but I don't think this was ever target of discussion there |
@pieh I'm afraid this will not work as |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Could you please suggest if I should make this pull request or should we abandon this as unneeded feature? |
Hey everyone, sorry for the delay in chiming in. Let me explain a bit about my reasoning for keeping this outside of CI, hopefully that will provide some clarity. There are 3 situations where you need to run
Gatsby can automatically detect new routes (the first situation), which is what we use to check/update the cache hash. However, the 2nd and 3rd situation are too high-level to be automatically detected and thus must be manually enforced by the developer. Detecting fonts that need to be preloaded can become quite time consuming for any project larger than a few routes, often taking 10-15 minutes or more (it has to crawl every route in your site, dynamic and static). As such, I believe rerunning this script on every CI build will very often simply waste resources without any actual benefit. That being said, I do think rerunning this script anytime the cache hash changes (whenever new routes can be detected by Gatsby) would be useful and wouldn’t needlessly waste resources. @masives if you’d like to open a PR to add a non-interactive mode for @pieh does that help clear things up? |
@superhawk610 Thanks for the explanation, I'll draft a PR for this in this or next week. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
Summary
gatsby-plugin-preload-fonts requires user action if fonts are detected to be unchanged. This makes it impossible to use with any CI tool as it will hang the build. It would be useful to have an option to provide a flag/env variable that would skip this check or force it to be done again.
Basic example
Currently for each page hash is created a
If the proposal involves a new or changed API, include a basic code example. Omit this section if it's not applicable.
Motivation
To enable using this plugin in CI
I can provide PR
The text was updated successfully, but these errors were encountered: