-
Notifications
You must be signed in to change notification settings - Fork 13
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
[BUG] Disabled mapper resolver generation #317
Comments
Hi @marisbest2, I see your point 👍 The naming is a bit confusing at the moment and I'll look to improve this soon.
To take full control i.e. disabling type wireup and static analysis, you can use externalResolvers to point to your own resolver implementation: defineConfig({
resolverGeneration: 'disabled',
externalResolvers: {
TypeA: './path/to/TypeAFile#TypeA',
TypeB: './path/to/TypeBFile#TypeB',
// other files you want to take full control of...
},
}), Note that you'd have to add all the files you don't want the server preset to run analysis here, for now. I'll look into improving these config in the near future so that they have better names, and better documented |
Cool I'll give that a try. I think I'd suggest "disabled" to mean "don't generate any resolvers" and then something else to mean "do the bare minimum". I guess that'd be a breaking change, so maybe keep "disabled" to mean what it means and add a "off" option which just completely skips that step? Alternatively maybe a "types-only" mode? Anyway thanks! |
Yes, that's a great suggestion 👍 |
Closing this as discussion has finished and we have a workaround. |
(Note, this may be intended behavior in which case consider this a FR)
Describe the bug
When I have mappers and
resolverGeneration: disabled
I expect there to not be resolvers generated but there are.The docs say
To Reproduce
resolverGeneration: disabled
Expected behavior
I expect resolvers to not be generated
Versions
"@eddeee888/gcg-typescript-resolver-files": "^0.10.2"
(but appears to be long standing behavior)Additional context
Full config:
Why I want this:
I have existing resolvers which all work nicely. Now I'm layering in the types and I don't want to move them all. Mappers should make my life a lot easier. But I definitely don't want to move all my resolvers around.
The text was updated successfully, but these errors were encountered: