Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prinzhorn/hey-api-openapi-ts-mts
https://github.com/prinzhorn/hey-api-openapi-ts-mts
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/prinzhorn/hey-api-openapi-ts-mts
- Owner: Prinzhorn
- Created: 2024-06-11T06:41:38.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-14T08:45:49.000Z (5 months ago)
- Last Synced: 2024-06-14T12:42:09.086Z (5 months ago)
- Language: TypeScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hey-api-openapi-ts-mts
We have a Node.js project that is still CommonJS, but it uses TypeScript (`tsx` locally, `tsc` to build).
Now I need to integrate a client generated by openapi-ts. This is a minimal repo extracted from our code. `index.ts` is a CommonJS module. It includes `worker.ts`. Which is now an ESM module to be able to load the generated client. Locally with `tsx` this works perfectly fine. But the `tsc` build fails.
## Steps
1. `npm run generate-client`
2. `npm run start` -> This successfully runs the code with `tsx`
3. `npm run build` -> This fails to build the code using `tsc`