Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cbfea76

Browse filesBrowse files
authored
Merge pull request #15463 from webpack/fix/add-missing-option
add parserOptions.importMetaContext option
2 parents 75383c9 + f51e099 commit cbfea76
Copy full SHA for cbfea76

File tree

Expand file treeCollapse file tree

5 files changed

+66
-1
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+66
-1
lines changed

‎declarations/WebpackOptions.d.ts

Copy file name to clipboardExpand all lines: declarations/WebpackOptions.d.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2965,6 +2965,10 @@ export interface JavascriptParserOptions {
29652965
* Enable/disable evaluating import.meta.
29662966
*/
29672967
importMeta?: boolean;
2968+
/**
2969+
* Enable/disable evaluating import.meta.webpackContext.
2970+
*/
2971+
importMetaContext?: boolean;
29682972
/**
29692973
* Include polyfills or mocks for various node stuff.
29702974
*/

‎schemas/WebpackOptions.check.js

Copy file name to clipboardExpand all lines: schemas/WebpackOptions.check.js
+1-1Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎schemas/WebpackOptions.json

Copy file name to clipboardExpand all lines: schemas/WebpackOptions.json
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,10 @@
16241624
"description": "Enable/disable evaluating import.meta.",
16251625
"type": "boolean"
16261626
},
1627+
"importMetaContext": {
1628+
"description": "Enable/disable evaluating import.meta.webpackContext.",
1629+
"type": "boolean"
1630+
},
16271631
"node": {
16281632
"$ref": "#/definitions/Node"
16291633
},

‎test/__snapshots__/Cli.basictest.js.snap

Copy file name to clipboardExpand all lines: test/__snapshots__/Cli.basictest.js.snap
+52Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,19 @@ Object {
16381638
"multiple": false,
16391639
"simpleType": "boolean",
16401640
},
1641+
"module-parser-javascript-auto-import-meta-context": Object {
1642+
"configs": Array [
1643+
Object {
1644+
"description": "Enable/disable evaluating import.meta.webpackContext.",
1645+
"multiple": false,
1646+
"path": "module.parser.javascript/auto.importMetaContext",
1647+
"type": "boolean",
1648+
},
1649+
],
1650+
"description": "Enable/disable evaluating import.meta.webpackContext.",
1651+
"multiple": false,
1652+
"simpleType": "boolean",
1653+
},
16411654
"module-parser-javascript-auto-node": Object {
16421655
"configs": Array [
16431656
Object {
@@ -2202,6 +2215,19 @@ Object {
22022215
"multiple": false,
22032216
"simpleType": "boolean",
22042217
},
2218+
"module-parser-javascript-dynamic-import-meta-context": Object {
2219+
"configs": Array [
2220+
Object {
2221+
"description": "Enable/disable evaluating import.meta.webpackContext.",
2222+
"multiple": false,
2223+
"path": "module.parser.javascript/dynamic.importMetaContext",
2224+
"type": "boolean",
2225+
},
2226+
],
2227+
"description": "Enable/disable evaluating import.meta.webpackContext.",
2228+
"multiple": false,
2229+
"simpleType": "boolean",
2230+
},
22052231
"module-parser-javascript-dynamic-node": Object {
22062232
"configs": Array [
22072233
Object {
@@ -2727,6 +2753,19 @@ Object {
27272753
"multiple": false,
27282754
"simpleType": "boolean",
27292755
},
2756+
"module-parser-javascript-esm-import-meta-context": Object {
2757+
"configs": Array [
2758+
Object {
2759+
"description": "Enable/disable evaluating import.meta.webpackContext.",
2760+
"multiple": false,
2761+
"path": "module.parser.javascript/esm.importMetaContext",
2762+
"type": "boolean",
2763+
},
2764+
],
2765+
"description": "Enable/disable evaluating import.meta.webpackContext.",
2766+
"multiple": false,
2767+
"simpleType": "boolean",
2768+
},
27302769
"module-parser-javascript-esm-node": Object {
27312770
"configs": Array [
27322771
Object {
@@ -3197,6 +3236,19 @@ Object {
31973236
"multiple": false,
31983237
"simpleType": "boolean",
31993238
},
3239+
"module-parser-javascript-import-meta-context": Object {
3240+
"configs": Array [
3241+
Object {
3242+
"description": "Enable/disable evaluating import.meta.webpackContext.",
3243+
"multiple": false,
3244+
"path": "module.parser.javascript.importMetaContext",
3245+
"type": "boolean",
3246+
},
3247+
],
3248+
"description": "Enable/disable evaluating import.meta.webpackContext.",
3249+
"multiple": false,
3250+
"simpleType": "boolean",
3251+
},
32003252
"module-parser-javascript-node": Object {
32013253
"configs": Array [
32023254
Object {

‎types.d.ts

Copy file name to clipboardExpand all lines: types.d.ts
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5508,6 +5508,11 @@ declare interface JavascriptParserOptions {
55085508
*/
55095509
importMeta?: boolean;
55105510

5511+
/**
5512+
* Enable/disable evaluating import.meta.webpackContext.
5513+
*/
5514+
importMetaContext?: boolean;
5515+
55115516
/**
55125517
* Include polyfills or mocks for various node stuff.
55135518
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.