Skip to content

Commit d73d1b0

Browse files
docs: add parserOptions.importMetaContext (#6028)
* docs: add parserOptions.importMetaContext * Update src/content/configuration/module.mdx Co-authored-by: Nitin Kumar <[email protected]>
1 parent 92fcbb3 commit d73d1b0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/content/configuration/module.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,25 @@ Specifies the behavior of invalid export names in `\"import ... from ...\"`.
203203
};
204204
```
205205

206+
#### module.parser.javascript.importMetaContext
207+
208+
Enable/disable evaluating [`import.meta.webpackContext`](/api/module-variables/#importmetawebpackcontext).
209+
210+
- Type: `boolean`
211+
- Available: 5.70.0+
212+
- Example:
213+
```js
214+
module.exports = {
215+
module: {
216+
parser: {
217+
javascript: {
218+
importMetaContext: true,
219+
},
220+
},
221+
},
222+
};
223+
```
224+
206225
#### module.parser.javascript.reexportExportsPresence
207226

208227
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.

0 commit comments

Comments
 (0)