Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rollup-plugin-sourcemaps2

2wce37.4kMIT0.5.2TypeScript support: included

Rollup plugin for grabbing source maps from sourceMappingURLs

rollup, rollup-plugin, sourcemap, source-map, sourceMappingURL

readme

rollup-plugin-sourcemaps2

Version License Build Status

Rollup plugin for loading files with existing source maps. Inspired by webpack/source-map-loader.

Works with rollup 4.x.x or later.

This is building on top of the awesome work of Max Davidson. The repo wasn't getting updates so I took it upon myself to keep a copy updated

If you use rollup-plugin-babel, you might be able to use the inputSourceMap option instead of this plugin. Conversely, if you use this plugin alongside rollup-plugin-babel, you should explicitly set the Babel inputSourceMap option to false.

If this plugin is not resolving the sourcemap URL (particularly on MS Windows), try also including the official rollup plugin @rollup/plugin-url.

Why?

  • You transpile your files with source maps before bundling with rollup
  • You consume external modules with bundled source maps

Usage

import sourcemaps from 'rollup-plugin-sourcemaps2';

export default {
  input: 'src/index.js',
  plugins: [sourcemaps()],
  output: {
    sourcemap: true,
    file: 'dist/my-awesome-package.js',
  },
};

changelog

rollup-plugin-sourcemaps2

0.5.2

Patch Changes

  • 2790ea0: fix: correctly encode non ascii characters on reading file

0.5.1

Patch Changes

  • 01b826d: chore: update dependencies

0.5.0

Minor Changes

  • e9932a3: fix: resolve only the last source mapping url in case there are multiple urls from source.

Patch Changes

  • e9932a3: chore: update package dependencies 🧹🧹

0.4.4

Patch Changes

  • 251dd7f: chore: update package dependencies 🧹🧹

0.4.3

Patch Changes

  • abeda6d: chore: update package dependencies 🧹🧹

0.4.2

Patch Changes

  • 258da1f: chore: update package dependencies 🧹🧹

0.4.1

Patch Changes

  • fc3c329: fix: improved types & reduced dependencies

0.4.0

Minor Changes

  • 4e12df2: feat: fixes build & watches files on load

0.3.0

Minor Changes

  • a6c10b1: chore: add declaration files

0.2.0

Minor Changes

  • f015da6: chore: add basic support for windows

0.1.0

Minor Changes

  • 43333b4: chore: upgrade dependencies to latest