diff --git a/tsup.config.ts b/tsup.config.ts index bd5bc87..eca2281 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -17,6 +17,7 @@ export default defineConfig({ if (this.format === 'cjs') { const regex = /require\("(?\.\/.+)"\)/g; // TODO: should do nothing if file already ends in .cjs + // TODO: could be more resilient for `"` vs `'` imports return { code: code.replace(regex, "require('$.cjs')") }; } },