rust-sourcemap icon indicating copy to clipboard operation
rust-sourcemap copied to clipboard

Add a Method to Obtain Ownership of Source Map Fields

Open SyMind opened this issue 1 year ago • 1 comments

When using SWC to transform JavaScript, I need to convert the source map returned by SWC into the source map of rspack-sources.

I expect to reuse the data in the source map during the conversion process, so I hope there could be an API like the following:

let sources: Vec<Arc<str>> = sourcemap.take_sources();
let sources_content: Vec<Arc<str>> = sourcemap.take_sources_content();

SyMind avatar Nov 19 '24 07:11 SyMind

Hi, thank you for the suggestion.

loewenheim avatar Nov 19 '24 08:11 loewenheim