Skip to content

Commit

Permalink
docs(configuration): document overrideStrict (#7309)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan authored Jul 12, 2024
1 parent 8729c4f commit dc12545
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/content/configuration/module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ module.exports = {
// Parser options for javascript modules
// e.g, enable parsing of require.ensure syntax
requireEnsure: true,
// Set the module to `'strict'` or `'non-strict'` mode. This can affect the module's behavior, as some behaviors differ between strict and non-strict modes.
overrideStrict: 'non-strict',
},
'javascript/auto': {
// ditto
Expand Down Expand Up @@ -528,6 +530,26 @@ Enable/disable evaluating [`import.meta.webpackContext`](/api/module-variables/#
};
```
#### module.parser.javascript.overrideStrict
Set the module to `'strict'` or `'non-strict'` mode. This can affect the module's behavior, as some behaviors differ between strict and non-strict modes.

- Type: `'strict' | 'non-strict'`
- Available: 5.93.0+
- Example:

```js
module.exports = {
module: {
parser: {
javascript: {
overrideStrict: 'non-strict',
},
},
},
};
```

#### module.parser.javascript.reexportExportsPresence

Specifies the behavior of invalid export names in `\"export ... from ...\"`. This might be useful to disable during the migration from `\"export ... from ...\"` to `\"export type ... from ...\"` when reexporting types in TypeScript.
Expand Down

0 comments on commit dc12545

Please sign in to comment.