Skip to content

fix: pass sourcemap into Rollup treeShakingPlugin - #890

Closed
aleclarson wants to merge 1 commit into
egoist:devfrom
aleclarson:fix/889
Closed

aleclarson wants to merge 1 commit into
egoist:devfrom
aleclarson:fix/889

Conversation

@aleclarson

Copy link
Copy Markdown

Fixes #889

@codesandbox

codesandbox Bot commented Apr 21, 2023

Copy link
Copy Markdown

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@vercel

vercel Bot commented Apr 21, 2023 •

Copy link
Copy Markdown

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 Jul 16, 2024 9:52pm

@aleclarson

Copy link
Copy Markdown
Author

Hmm, still not producing correct sourcemaps...

Could be something to do with:

tsup/src/plugin.ts

Lines 156 to 166 in 322cb77

if (result.map) {
const originalConsumer = await new SourceMapConsumer(
parseSourceMap(info.map)
)
const newConsumer = await new SourceMapConsumer(
parseSourceMap(result.map)
)
const generator =
SourceMapGenerator.fromSourceMap(originalConsumer)
generator.applySourceMap(newConsumer, info.path)
info.map = generator.toJSON()

…or maybe it's a Rollup bug?

sxzz
sxzz previously approved these changes Jul 16, 2024
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This issue has been resolved in version 8.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — 86f5794c Deployed Jul 16, 2024 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sourcemaps break when using treeshake: 'smallest'

2 participants