Files
react-native-devtools-frontend/node_modules/rollup-plugin-sourcemaps
Simon Zünd 1bd98ee250 [deps] Add 'rollup-plugin-sourcemaps' intended for release builds
We plan to enable source maps for release builds behind a GN flag. For
this to work rollup needs to consume the source maps already generated
by tsc and merge it with its own source map. Rollup can't do this
natively so this CL adds a plugin that can.

R=jacktfranklin@chromium.org

Bug: 1430396
Change-Id: Ibb38c7892326907431e54b7c7dbd7b912b59ccb9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4397707
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-04-04 13:31:33 +00:00
..

rollup-plugin-sourcemaps

npm Build Status Coverage Status

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

Works with rollup 0.31.2 or later.

If you use rollup-plugin-babel, you might be able to use the inputSourceMap option instead of this plugin.

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-sourcemaps';

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