Closed stretch0 closed 2 years ago
No. Because this plugin is deeply dependent on the GatsbyJS process, it cannot currently be run independently.
Since v3, It may provide a feature flag to kill the gatsby process immediately after emmitting files.
Does that mean __generated__/gatsby-types.ts
can't be gitignored?
... If you want type-check first. I guess so.
Actually, nvm. Just realised it's because we were running our tsc
command before the app had started
"start": "tsc && gatsby develop",
Have moved tsc
to poststart script now
"start": "gatsby develop",
"poststart": "tsc",
Hmm well, Just sayin fyi
Since types in GatsbyJS are inferred after the query compiler is executed, there is no way to check it completely before that process done at least once.
Is it possible to run this plugin as part of a pre script?
Types get generated when developing which is fine but would good to then gitignore them and have them generated when a build happens.
This mans when the next developer pulls down the code changes, the app wont run because it can't start with missing types / interfaces.
Running a codegen in a pre start script of some description would solve this. Is this possible?