Moved the package code into "packages/gatsby-source-sanity" and declared that folder and anything in packages or examples folders as workspaces.
This to better separate the example(s) and the package code, and for easier testing of the package under development. Normally you could have just relative-imported the package in a bundled example project, but Gatsby relies on module resolution to imports the configured plugins, so its much easier to just leverage workspaces and depend on * for the latest local version.
This way it is easy to run watch in the plugin and have a feedback loop of testing in the example app, and I will be adding more example apps to test further functionality.
I have proxies npm scripts from root into the package so existing CI/CD should keep working the same
Moved the package code into "packages/gatsby-source-sanity" and declared that folder and anything in packages or examples folders as workspaces.
This to better separate the example(s) and the package code, and for easier testing of the package under development. Normally you could have just relative-imported the package in a bundled example project, but Gatsby relies on module resolution to imports the configured plugins, so its much easier to just leverage workspaces and depend on
*
for the latest local version.This way it is easy to run
watch
in the plugin and have a feedback loop of testing in the example app, and I will be adding more example apps to test further functionality.I have proxies npm scripts from root into the package so existing CI/CD should keep working the same