-
Notifications
You must be signed in to change notification settings - Fork 25
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
Output scheme to theme instead of starter #167
Comments
Well, to be honest, I've been thinking about this recently while using the plugin for my work, and there's no clear answer yet. The difficult part is that this plugin cannot run independently of the site as it depends on the fully Gatsby.js lifecycle. |
I've considered providing a separate binary including Gatsby's default schema, but considering that the Gatsby Theme composition can be very heavy and complex, it is not a realistic solution. It only makes sense when it's all configured. My suggestion would be to emit the type from the actual configured site, but give it an extra option to put output closer to the theme. (e.g. multiple outputs, near-file-preset, etc) Or assuming that themes are usually managed in monorepo, the Gatsby site emitting types can be operated as a library. |
Consider the following example:
Shipping types with a theme by changing the output directory and this correctly puts the types in the theme that I'm developing. Is there an option to make the schema and plugin documents output inside of the theme instead of the main/starter project. I'm loading this plugin from the theme as well.
I'm using yarn workspaces to develop the theme as suggested in the Gatsby docs.
The text was updated successfully, but these errors were encountered: