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

sourcemap is incorrect when processing multiple files with existing sourcemaps #36

Open
youngderekm opened this issue Dec 1, 2021 · 0 comments

Comments

@youngderekm
Copy link

I have a collection of js files that were compiled from Typescript. I want to minify these with terser. They have existing sourcemaps. When I do this, some of the sourcemaps produced look incorrect. They have the wrong "sources" listed. It looks like they have the sources of the first file processed.

From my quick read of the code, it looks like options.sourceMap is modified and then passed into terser.

opts.sourceMap.filename = file.sourceMap.file
// ...
opts.sourceMap.content = file.sourceMap

Maybe opts.sourceMap should be clone from the original options each time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant