egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.48k stars 209 forks source link

fix: fix incorrect sourcemap with --treeshake #1069

Open xia0hj opened 6 months ago

xia0hj commented 6 months ago

depends on pr https://github.com/egoist/tsup/pull/890

related to issue https://github.com/egoist/tsup/issues/889#issuecomment-1871297831

  1. fix incorrect use of applySourceMap() correct example: https://github.com/mozilla/source-map/blob/master/test/test-source-map-generator.js#L356-L362

  2. set rollup treeshake output path to ./dist, so that sources in sourcemap can refer to ../src/index.ts instead of src/index.ts

codesandbox[bot] commented 6 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

vercel[bot] commented 6 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 28, 2023 3:38pm