Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: pass sourcemap into Rollup treeShakingPlugin #890

Closed
wants to merge 1 commit into from

Conversation

aleclarson
Copy link

Fixes #889

@codesandbox
Copy link

codesandbox bot commented Apr 21, 2023

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

@vercel
Copy link

vercel bot commented Apr 21, 2023

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
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
Copy link
Contributor

🎉 This issue has been resolved in version 8.1.2 🎉

The release is available on:

Your semantic-release 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