What is rollup-plugin-sourcemaps?
The rollup-plugin-sourcemaps package is a Rollup plugin that allows you to include existing source maps in your build process. This is particularly useful when you are working with libraries that already have source maps, and you want to preserve them in your final bundle.
Include existing source maps
This feature allows you to include existing source maps in your Rollup build. By using the sourcemaps() plugin, Rollup will read the source maps from your input files and include them in the final bundle.
{"plugins":["sourcemaps()"]}
Generate source maps for transformed code
This feature allows you to generate source maps for the transformed code. By setting the sourcemap option to true in the output configuration and using the sourcemaps() plugin, Rollup will generate source maps for the final bundle.
{"input":"src/main.js","output":{"file":"bundle.js","format":"cjs","sourcemap":true},"plugins":["sourcemaps()"]}