From ceb6c755ab3dff0fb549dd99d9bb3aa124c40326 Mon Sep 17 00:00:00 2001 From: Jeremy Wiebe Date: Thu, 27 Mar 2025 06:14:15 -0700 Subject: [PATCH] Clarify how .test and .include options work when they are a string. --- src/content/plugins/source-map-dev-tool-plugin.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/plugins/source-map-dev-tool-plugin.mdx b/src/content/plugins/source-map-dev-tool-plugin.mdx index 4dd3734ef771..eb8233847dfa 100644 --- a/src/content/plugins/source-map-dev-tool-plugin.mdx +++ b/src/content/plugins/source-map-dev-tool-plugin.mdx @@ -24,8 +24,8 @@ new webpack.SourceMapDevToolPlugin(options); The following options are supported: -- `test` (`string` `RegExp` `[string, RegExp]`): Include source maps for modules based on their extension (defaults to `.js`, `.mjs`, and `.css`). -- `include` (`string` `RegExp` `[string, RegExp]`): Include source maps for module paths that match the given value. +- `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. +- `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. - `exclude` (`string` `RegExp` `[string, RegExp]`): Exclude modules that match the given value from source map generation. - `filename` (`string`): Defines the output filename of the SourceMap (will be inlined if no value is provided). - `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.