Async operation in gatsby-config.js #32273
-
The configuration needed by one of the plugins lives in a external source, like an API/database. I would like to fetch them before using in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
If you need to fetch config for multiple plugins, we suggest you run a script before starting gatsby which downloads the config and writes it to a file that gatsby-config.js can require. If it's for a specific plugin, it can fetch the config options itself when it runs as all hooks support running async. |
Beta Was this translation helpful? Give feedback.
If you need to fetch config for multiple plugins, we suggest you run a script before starting gatsby which downloads the config and writes it to a file that gatsby-config.js can require.
If it's for a specific plugin, it can fetch the config options itself when it runs as all hooks support running async.