diff --git a/src/content/configuration/module.mdx b/src/content/configuration/module.mdx index 17b89833d1e8..12ae973bd416 100644 --- a/src/content/configuration/module.mdx +++ b/src/content/configuration/module.mdx @@ -1707,6 +1707,29 @@ import one from './pkg-1.json' with { type: 'json' }; In this example, `Rule.with` is used to apply `loader-assert.js` to any module imported with the condition `with { type: "json" }`. +## Rule.extractSourceMap + + + +`boolean = false` + +extract sourceMappingURL comments from modules. + +**webpack.config.js** + +```js +module.exports = { + // ... + module: { + rules: [ + { + extractSourceMap: true, + }, + ], + }, +}; +``` + ## Condition Conditions can be one of these: diff --git a/src/content/configuration/other-options.mdx b/src/content/configuration/other-options.mdx index 05b496f50b2e..ad03fa099ed1 100644 --- a/src/content/configuration/other-options.mdx +++ b/src/content/configuration/other-options.mdx @@ -354,3 +354,14 @@ Snapshots for resolving of build dependencies when using the persistent cache. - `hash`: Compare content hashes to determine invalidation (more expensive than `timestamp`, but changes less often). - `timestamp`: Compare timestamps to determine invalidation. + +### contextModule + + + +`object = {hash boolean = true, timestamp boolean = true}` + +Snapshots for building [context modules](/configuration/module/#module-contexts). + +- `hash`: Compare content hashes to determine invalidation (more expensive than `timestamp`, but changes less often). +- `timestamp`: Compare timestamps to determine invalidation.