I have code like:
export default foo;
but for some reason, tsup compiles this as:
export { foo as default }
I have confirmed that tsc
does not compile this way, so it's something on tsup's side.
here's my tsup.config:
import { defineConfig } from 'tsup';
const commonOptions = {
entry: ['src/index.ts', 'src/debug.ts'],
splitting: false,
sourcemap: true,
clean: true,
minify: true,
};
export default defineConfig(() => [
{
...commonOptions,
format: 'esm',
// outExtension: () => ({ js: '.mjs' }),
dts: true,
clean: true,
},
]);
this is breaking auto-import of packages for me, so I'd rather just use the normal export default
which fixes the problem.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too