RobinTail / express-zod-api

A Typescript library to help you get an API server up and running with I/O schema validation and custom middlewares in minutes.
https://ez.robintail.cz
MIT License
619 stars 30 forks source link

Ref: disabling dynamic imports in CJS build #1757

Closed RobinTail closed 5 months ago

RobinTail commented 5 months ago

There is a Jest issue on handling dynamic imports that is really annoying. I used to apply an approach discussed in this issue: https://github.com/evanw/esbuild/issues/2651 But now I'm going to apply another approach from the same one, just by disabling the dynamic imports for CJS, as a cleaner way (in my opinion).

https://esbuild.github.io/api/#supported