Socket
Book a DemoInstallSign in
Socket

unplugin-sourcemaps

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-sourcemaps

Universal plugin for loading existing source maps from imported modules. Works with Vite, Rollup, webpack, and esbuild.

0.1.2
latest
Source
npmnpm
Version published
Weekly downloads
16
33.33%
Maintainers
0
Weekly downloads
 
Created
Source

unplugin-sourcemaps

Universal plugin for loading existing source maps from imported modules.

Works with Vite, Rollup, esbuild, and Webpack.

Installation

Start by installing the package:

npm install unplugin-sourcemaps --save-dev

Then register the bundler-specific plugin and enable the source maps.

Vite
// vite.config.js

import { defineConfig } from 'vite';
import { ViteSourcemap } from 'unplugin-sourcemaps';

export default defineConfig( {
  plugins: [
    ViteSourcemap()
  ],
  build: {
    sourcemap: true
  }
} );
esbuild
// rollup.config.js

import { defineConfig } from 'rollup';
import { RollupSourcemap } from 'unplugin-sourcemaps';

export default defineConfig( {
  output: {
    // Other options are skipped for brevity
    sourcemap: true,
  },
  plugins: [
    RollupSourcemap()
  ]
} );
esbuild
import { build } from 'esbuild';
import { EsbuildSourcemap } from 'unplugin-sourcemaps';

build( {
  sourcemap: true,
  plugins: [
    SondaEsbuildPlugin()
  ]
} );
webpack
// webpack.config.js

const { WebpackSourcemap } = require( 'unplugin-sourcemaps' );

module.exports = {
  devtool: 'source-map',
  plugins: [
    WebpackSourcemap()
  ],
};

Keywords

sourcemap

FAQs

Package last updated on 12 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.