Hi. There is sourcemap issue in multiple entrypoint with esm
src/
- hello.ts
- index.ts
tsup.config.ts
// src/index.ts
export * from './hello';
// src/hello.ts
export function hello() {
console.log('hello');
}
// tsup.config.ts
import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/index.ts', 'src/hello.ts'],
format: ['esm'],
sourcemap: true,
});
when it build, both index.mjs.map, hello.mjs.map is empty
// dist/hello.mjs.map
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
// dist/index.mjs.map
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
only chunk file (chunk-{hashed}
) has sourcemap. maybe chunking has sourcemap issue?
it works correctly with cjs format.
Thanks!
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