You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin enables a more fine grained control of [source maps added via the `devtool` option](/configuration/devtool/).
11
+
This plugin enables more fine grained control of source map generation. It is an alternative to the [`devtool`](/configuration/devtool/) configuration option.
12
12
13
13
```javascript
14
14
newwebpack.SourceMapDevToolPlugin(options)
@@ -19,13 +19,20 @@ new webpack.SourceMapDevToolPlugin(options)
19
19
20
20
The following options are supported:
21
21
22
-
*`options.test` / `options.include` / `options.exclude` (`string|RegExp|Array`): Used to determine which assets should be processed. Each one can be a `RegExp` (asset filename is matched), a `string` (asset filename need to start with this string) or an `Array` of those (any of them need to be matched). `test` defaults to `.js` and `.css` files if omitted.
23
-
*`options.filename` (`string`): defines the output filename of the SourceMap. If no value is provided the source map is inlined.
24
-
*`options.append` (`string`): is appended to the original asset. Usually the `#sourceMappingURL` comment. `[url]` is replaced with a URL to the source map file. `false` disables the appending.
25
-
*`options.moduleFilenameTemplate` / `options.fallbackModuleFilenameTemplate` (`string`): see [`output.devtoolModuleFilenameTemplate`](/configuration/output/#output-devtoolmodulefilenametemplate).
26
-
*`options.module` (`boolean`): (defaults to `true`) When `false` loaders do not generate source maps and the transformed code is used as source instead.
27
-
*`options.columns` (`boolean`): (defaults to `true`) When `false` column mappings in source maps are ignored and a faster source map implementation is used.
28
-
*`options.lineToLine` (`{test: string|RegExp|Array, include: string|RegExp|Array, exclude: string|RegExp|Array}` matched modules uses simple (faster) line to line source mappings.
22
+
-`test` (`string|regex|array`): Include source maps for modules based on their extension (defaults to `.js` and `.css`).
23
+
-`include` (`string|regex|array`): Include source maps for module paths that match the given value.
24
+
-`exclude` (`string|regex|array`): Exclude modules that match the given value from source map generation.
25
+
-`filename` (`string`): Defines the output filename of the SourceMap (will be inlined if no value is provided).
26
+
-`append` (`string`): 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.
27
+
-`moduleFilenameTemplate` (`string`): See [`output.devtoolModuleFilenameTemplate`](/configuration/output/#output-devtoolmodulefilenametemplate).
28
+
-`fallbackModuleFilenameTemplate` (`string`): See link above.
29
+
-`module` (`boolean`): Indicates whether loaders should generate source maps (defaults to `true`).
30
+
-`columns` (`boolean`): Indicates whether column mappings should be used (defaults to `true`).
31
+
-`lineToLine` (`object`): Simplify and speed up source mapping by using line to line source mappings for matched modules.**
32
+
33
+
The `lineToLine` object allows for the same `test`, `include`, and `exclude` options described above.
34
+
35
+
T> Setting `module` and/or `columns` to `false` will yield less accurate source maps but will also improve compilation performance significantly.
0 commit comments