Open rikukissa opened 4 months ago
@tumbledwyer @naftis What is it that you were trying to achieve when working on this?
@tumbledwyer @naftis What is it that you were trying to achieve when working on this?
@jamil314 The issue is that exports from the commons
project cannot be imported into the client. So all pseudo imports are done via generating the gateway.ts
file.
The main issue I encountered was the mix of module types. client
is using ES modules and some of the other packages too, but commons
is using commonjs. Simply changing to ES modules everywhere doesn't work because jest doesn't natively support ES modules so all the tests break.
Vite is supposed to be able to import commonjs modules but that doesn't seem to be working properly either.
So I think the idea is to change moduleResolution to bundler
to be able to handle mixed module types.
Me and @tumbledwyer have worked on this earlier @jamil314
Atleast remember client needing
"moduleResolution": "bundler"
which the old TypeScript version didn't support.