Is your feature request related to a problem? Please describe.
Currently, running NestJS with SWC Loader is not possible (for build and start phase) because of the way that DTOs are handled.
I've hit multiple issues:
[ ] Circular Import errors on the @FilterRelation (and the other options) decorators shown as Reference errors. Note, I figured out that you can do () => require('DTO') to avoid it just for the relations, however, if I want to use the DTO in a {Omit|Pick}Type from nestjs it will throw the reference error with no known workaround that i can discern as of yet.
[ ] Using the FilterType function to generate filter inputs throws this error No fields found to create FilterType. Ensure undefined is annotated with @nestjs/graphql @ObjectType
[ ] Possibly more that I haven't hit because of I can't resolve the Filter type above.
Describe the solution you'd like
Support for SWC including ways to avoid circular imports similar to TypeOrms Relation function.
Describe alternatives you've considered
Currently we are using swc for dev purposes by building with Webpack initially, but it'd be nice to be able to get the build gains by compiling only through SWC
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe. Currently, running NestJS with SWC Loader is not possible (for build and start phase) because of the way that DTOs are handled.
I've hit multiple issues:
() => require('DTO')
to avoid it just for the relations, however, if I want to use the DTO in a{Omit|Pick}Type
from nestjs it will throw the reference error with no known workaround that i can discern as of yet.FilterType
function to generate filter inputs throws this errorNo fields found to create FilterType. Ensure undefined is annotated with @nestjs/graphql @ObjectType
Have you read the Contributing Guidelines?
Yes
Describe the solution you'd like Support for SWC including ways to avoid circular imports similar to TypeOrms
Relation
function.Describe alternatives you've considered Currently we are using swc for dev purposes by building with Webpack initially, but it'd be nice to be able to get the build gains by compiling only through SWC
Additional context Add any other context or screenshots about the feature request here.