Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/content/configuration/module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Badge text="v5.102.0+" />

`boolean = false`

extract sourceMappingURL comments from modules.

**webpack.config.js**

```js
module.exports = {
// ...
module: {
rules: [
{
extractSourceMap: true,
},
],
},
};
```

## Condition

Conditions can be one of these:
Expand Down
11 changes: 11 additions & 0 deletions src/content/configuration/other-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Badge text="v5.102.0+" />

`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.
Loading