Skip to content

Commit ceb6c75

Browse files
authored
Clarify how .test and .include options work when they are a string.
1 parent 1ff902c commit ceb6c75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/content/plugins/source-map-dev-tool-plugin.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ new webpack.SourceMapDevToolPlugin(options);
2424

2525
The following options are supported:
2626

27-
- `test` (`string` `RegExp` `[string, RegExp]`): Include source maps for modules based on their extension (defaults to `.js`, `.mjs`, and `.css`).
28-
- `include` (`string` `RegExp` `[string, RegExp]`): Include source maps for module paths that match the given value.
27+
- `test` (`string` `RegExp` `[string, RegExp]`): Include source maps for modules paths that match the given value (defaults to modules with the extensions `.js`, `.cjs`, `.mjs`, and `.css`). Note that when this option is a string, it matches from the start of the path.
28+
- `include` (`string` `RegExp` `[string, RegExp]`): Include source maps for module paths that match the given value. Note that when this option is a string, it matches from the start of the path.
2929
- `exclude` (`string` `RegExp` `[string, RegExp]`): Exclude modules that match the given value from source map generation.
3030
- `filename` (`string`): Defines the output filename of the SourceMap (will be inlined if no value is provided).
3131
- `append` (`string` `function` `false`): Appends the given value to the original asset. Usually the `#sourceMappingURL` comment. `[url]` is replaced with a URL to the source map file. Since webpack v4.36.0, path parameters are supported: `[chunk]`, `[filename]` and `[contenthash]`. Setting `append` to `false` disables the appending.

0 commit comments

Comments
 (0)