Skip to content

Commit 232403c

Browse files
committed
fix discussions
1 parent 17e8eed commit 232403c

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

lib/config/defaults.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ const applyJavascriptParserOptionsDefaults = (
469469
D(parserOptions, "wrappedContextRecursive", true);
470470
D(parserOptions, "wrappedContextCritical", false);
471471
D(parserOptions, "strictThisContextOnImports", false);
472+
D(parserOptions, "importMeta", true);
472473
if (futureDefaults) D(parserOptions, "exportsPresence", "error");
473474
};
474475

@@ -501,9 +502,7 @@ const applyModuleDefaults = (
501502
D(module.parser.asset.dataUrlCondition, "maxSize", 8096);
502503
}
503504

504-
F(module.parser, "javascript", () => ({
505-
importMeta: true
506-
}));
505+
F(module.parser, "javascript", () => ({}));
507506
applyJavascriptParserOptionsDefaults(module.parser.javascript, {
508507
futureDefaults
509508
});

lib/dependencies/ImportMetaPlugin.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,6 @@ class ImportMetaPlugin {
6565
parser.state.module.addPresentationalDependency(dep);
6666
return true;
6767
});
68-
parser.hooks.unhandledExpressionMemberChain
69-
.for("import.meta")
70-
.tap("ImportMetaPlugin", (expr, members) => {
71-
const dep = new ConstDependency(
72-
`${importMetaName}${propertyAccess(members, 0)}`,
73-
expr.range
74-
);
75-
dep.loc = expr.loc;
76-
parser.state.module.addPresentationalDependency(dep);
77-
return true;
78-
});
7968
return;
8069
}
8170

test/Defaults.unittest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ describe("Defaults", () => {
218218
"exprContextRecursive": true,
219219
"exprContextRegExp": false,
220220
"exprContextRequest": ".",
221+
"importMeta": true,
221222
"strictExportPresence": undefined,
222223
"strictThisContextOnImports": false,
223224
"unknownContextCritical": true,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy