EvalSourceMapDevToolPlugin
This plugin enables more fine grained control of source map generation. It is also enabled automatically by certain settings of the devtool configuration option.
Examples
Basic use case
You can use the following code to replace the configuration option devtool: eval-source-map with an equivalent custom plugin configuration:
Exclude vendor maps
The following code would exclude source maps for any modules in the vendor.js bundle:
Options
test
- Type:
stringRegExp[string, RegExp]
Include source maps for modules based on their extension (defaults to .js, .mjs, and .css).
include
- Type:
stringRegExp[string, RegExp]
Include source maps for module paths that match the given value.
exclude
- Type:
stringRegExp[string, RegExp]
Exclude modules that match the given value from source map generation.
append
- Type:
string | function
Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.
module
- Type:
boolean
Indicates whether loaders should generate source maps (defaults to true).
columns
- Type:
boolean
Indicates whether column mappings should be used (defaults to true).
This page is adapted from webpack documentation under the CC BY 4.0, with modifications.

