output.sourceMap

  • Type:
type SourceMap = {
  js?: Rspack.Configuration['devtool'];
  css?: boolean;
};
  • Default:
const defaultSourceMap = {
  js: isDev ? 'cheap-module-source-map' : false,
  css: false,
};

Used to set whether to generate source map files, and which format of source map to generate.

INFO

The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to Rsbuild - output.sourceMap.