{"library":"rollup-plugin-sourcemaps2","title":"rollup-plugin-sourcemaps2","description":"Rollup plugin that loads existing source maps from sourceMappingURL comments in files, enabling proper source map chaining when input files already contain source maps (e.g., after transpilation with Babel, TypeScript, or ESBuild). Current stable version is 0.5.6, with monthly patch releases and a major update to Rollup 4 in v0.5.0. Key differentiators: actively maintained fork of the abandoned rollup-plugin-sourcemaps, supports both async and sync loading, handles multiple sourceMappingURLs, and encodes non-ASCII characters correctly. Requires Rollup >=4 and Node >=18.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-sourcemaps2"],"cli":null},"imports":["import sourcemaps from 'rollup-plugin-sourcemaps2'","import sourcemaps from 'rollup-plugin-sourcemaps2'","import type { Options } from 'rollup-plugin-sourcemaps2'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import sourcemaps from 'rollup-plugin-sourcemaps2';\nimport babel from '@rollup/plugin-babel';\nimport { defineConfig } from 'rollup';\n\nexport default defineConfig({\n  input: 'src/index.js',\n  plugins: [\n    babel({ babelHelpers: 'bundled', inputSourceMap: false }),\n    sourcemaps({\n      // include/exclude patterns (optional)\n      exclude: /node_modules/,\n      filter: (file) => file.endsWith('.js')\n    })\n  ],\n  output: {\n    file: 'dist/bundle.js',\n    format: 'esm',\n    sourcemap: true\n  }\n});","lang":"typescript","description":"Shows setup with rollup-plugin-babel where inputSourceMap is disabled to avoid conflicts, and sourcemaps plugin loads existing maps.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}