Conversation
✅ Deploy Preview for netlify-plugin-gatsby-demo ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
| "prepare": "npm run build" | ||
| }, | ||
| "dependencies": { | ||
| "@gatsby-cloud-pkg/merlin-synchronizer": "^0.3.6", |
There was a problem hiding this comment.
Adding it as a dep of the plugin should make it resolvable to builds, but we can do tests with auto-install using feature flags later
| if ( | ||
| !process.env.GATSBY_CLOUD_DATALAYER || | ||
| !process.env.GATSBY_SITE_ID || | ||
| !process.env.SITE_AUTH_JWT | ||
| ) { |
There was a problem hiding this comment.
These currently need to be manually set
There was a problem hiding this comment.
instead of SITE_AUTH_JWT, can we make it RESOURCE_AUTH_JWT
There was a problem hiding this comment.
and instead of GATSBY_SITE_ID lets do CONTENT_CLOUD_ID
There was a problem hiding this comment.
SITE_AUTH_JWT is for merlin-synchronizer, so we'd need to change that module to allow either
| * This file was copied from Gatsby core and modified and will be copied back into node_modules/gatsby when Netlify does a cold-cache build. | ||
| * See 'helpers/files.ts' | ||
| */ | ||
|
|
There was a problem hiding this comment.
This injected file is copied from the Gatsby repo with a few small changes to work on Netlify
| return originalSourceNodesApiRunner.sourceNodesApiRunner(args) | ||
| } | ||
|
|
||
| const { synchronize } = require(`@gatsby-cloud-pkg/merlin-synchronizer`) |
There was a problem hiding this comment.
We may need to replace this with a full resolved path to the dependency if resolving from an auto-installed plugin fails
| encoding: `string`, | ||
| }).init() | ||
|
|
||
| const siteId = process.env.GATSBY_SITE_ID |
Summary
PoC for experimental decoupled sourcing support. Test this by installing
@netlify/plugin-gatsby@merlinand then setting the env varsGATSBY_CLOUD_DATALAYER,CONTENT_CLOUD_IDandRESOURCE_AUTH_JWTTest plan
Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal
Standard checks:
🧪 Once merged, make sure to update the version if needed and that it was
published correctly.