Closed laat closed 1 year ago
Since cjs would not work with type module, the file ext should be .mjs. Also, tsc doesn't seem to be able to change file ext. https://github.com/microsoft/TypeScript/issues/49462
I'm pretty happy with tsup
tsup src --format cjs,esm --clean --sourcemap
instead of or in conjunction with tsc
That looks cool. vite is also another option since openapi3-ts depends on vitest. I don't have a special opinion.
package.json
app.mjs
it fails to import when running
node app.mjs
It's probably because the published package.json does not have
"type": "module"
, or that the published files does not end with ".mjs"