-
Notifications
You must be signed in to change notification settings - Fork 10
Add UsersModule with TypeORM #2
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
base: master
Are you sure you want to change the base?
Add UsersModule with TypeORM #2
Conversation
68b51d8
to
d5d0a0a
Compare
d5d0a0a
to
635500e
Compare
This does not work with swc or ESBuild :/
635500e
to
a987fe4
Compare
@peterfication - I think your module definition(users.module.ts) might be wrong, shouldn't it be?
|
Yeah, right. But it will still fail on another level: |
@peterfication I think this boils down to configuration issues. the table wont exist unless you create it or make nest generate it |
Yes, the table needs to be created, but it shouldn't be called |
@peterfication - yep, I haven't worked with typeORM so I don't know what the default behaviour is. doesn't seem right indeed :) you could pass in a table name to the entity attribute to go around that though. so there is a workaround at least. |
@peterfication - you should be able to retain names and get the table named correctly by modifying the esbuild.transpiler file:
See - https://esbuild.github.io/api/#keep-names for more info. |
Thanks a lot @gozmanyoni, this fixed it for ESBuild. Also, SWC added an option called 🎉 |
This resolved it for me 💪 |
Hey @techvlad,
Thanks a lot for your swc/ESBuild setup. I tried it out but couldn't get it to work with the dependency injection of TypeORM. Do you have any ideas whether this could be resolved? I checked out ESBuild and swc but had no luck finding a solution for it :/
Any hints are appreciated :)