| title | SourceMapDevToolPlugin | |
|---|---|---|
| contributors |
|
?> Review this content
Adds SourceMaps for assets.
new webpack.SourceMapDevToolPlugin(options)options.test/options.include/options.exclude(string|RegExp|Array): Used to determine which assets should be processed. Each one can be aRegExp(asset filename is matched), astring(asset filename need to start with this string) or anArrayof those (any of them need to be matched).testdefaults to.jsfiles if omitted.options.filename(string): defines the output filename of the SourceMap. If no value is provided the SourceMap is inlined.options.append(string): is appended to the original asset. Usually the#sourceMappingURLcomment.[url]is replaced with a URL to the SourceMap file.falsedisables the appending.options.moduleFilenameTemplate/options.fallbackModuleFilenameTemplate(string): seeoutput.devtoolModuleFilenameTemplate.options.module(boolean): (defaults totrue) Whenfalseloaders do not generate SourceMaps and the transformed code is used as source instead.options.columns(boolean): (defaults totrue) Whenfalsecolumn mappings in SourceMaps are ignored and a faster SourceMap implementation is used.options.lineToLine({test: string|RegExp|Array, include: string|RegExp|Array, exclude: string|RegExp|Array}matched modules uses simple (faster) line to line source mappings.
?> TODO
原文:https://webpack.js.org/plugins/source-map-dev-tool-plugin/