Skip to content

Latest commit

 

History

History

rspack

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@debugids/rspack

npm version

Injects Debug IDs into source and sourcemaps when using Rspack.

Rspack v1.2.0 and later support debug IDs natively without any plugins. Just add -debugids to the end of any devtool option:

rspack.config.mjs

export default {
  entry: "./src/main.js",
  mode: "production",
  devtool: "source-map-debugids",
  output: {
    filename: "main.js",
    path: "./dist",
  },
};

For older versions of webpack, you can use this plugin to inject debug IDs:

rspack.config.mjs

import { DebugIdRspackPlugin } from "debug-id/rspack";

export default {
  entry: "./src/main.js",
  plugins: [new DebugIdRspackPlugin()],
  mode: "production",
  devtool: "source-map",
  output: {
    filename: "main.js",
    path: "./dist",
  },
};