Commit e43ac4b
committed
fix(codegen): resolve codegen plugins from the app, not the cli
Typecheck depends on codegen, and codegen failed once the global store
became active in CI:
Unable to find template plugin matching 'schema-ast'
The plugin is not missing. @graphql-codegen/schema-ast is declared as a
dependency of this app, but the codegen CLI resolves plugin packages
relative to its own location, and the store links the CLI in from outside
the project. From there the app's dependencies are not reachable, so the
short name fails to load. The client preset was unaffected because
presets resolve by a different path.
Point pluginLoader at this config file so plugins resolve where they are
declared. Same underlying cause as the React type redirect: a package
resolving a sibling by name from a store path that sits outside the
project.
With codegen working, the full typecheck reports zero errors against the
symlinked tree.1 parent fbf3aa5 commit e43ac4b
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
0 commit comments