Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(configuration): add parser options for dynamic import #6145

Merged
merged 1 commit into from
Jun 3, 2022
Merged
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
57 changes: 57 additions & 0 deletions src/content/configuration/module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,63 @@ Note that only `webpackIgnore` comment is supported at the moment:
const x = require(/* webpackIgnore: true */ 'x');
```

#### module.parser.javascript.dynamicImportMode

Specifies global mode for dynamic import.

- Type: `'eager' | 'weak' | 'lazy' | 'lazy-once'`
- Available: 5.73.0+
- Example:
```js
module.exports = {
module: {
parser: {
javascript: {
dynamicImportMode: 'lazy',
},
},
},
};
```

#### module.parser.javascript.dynamicImportPrefetch

Specifies global prefetch for dynamic import.

- Type: ` number | boolean`
- Available: 5.73.0+
- Example:
```js
module.exports = {
module: {
parser: {
javascript: {
dynamicImportPrefetch: false,
},
},
},
};
```

#### module.parser.javascript.dynamicImportPreload

Specifies global preload for dynamic import.

- Type: ` number | boolean`
- Available: 5.73.0+
- Example:
```js
module.exports = {
module: {
parser: {
javascript: {
dynamicImportPreload: false,
},
},
},
};
```

#### module.parser.javascript.exportsPresence

Specifies the behavior of invalid export names in `\"import ... from ...\"` and `\"export ... from ...\"`.
Expand Down