Skip to content

Commit

Permalink
fix discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
vankop committed Jan 28, 2022
1 parent 17e8eed commit 4714fb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
5 changes: 2 additions & 3 deletions lib/config/defaults.js
Expand Up @@ -469,6 +469,7 @@ const applyJavascriptParserOptionsDefaults = (
D(parserOptions, "wrappedContextRecursive", true);
D(parserOptions, "wrappedContextCritical", false);
D(parserOptions, "strictThisContextOnImports", false);
D(parserOptions, "importMeta", true);
if (futureDefaults) D(parserOptions, "exportsPresence", "error");
};

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

F(module.parser, "javascript", () => ({
importMeta: true
}));
F(module.parser, "javascript", () => ({}));
applyJavascriptParserOptionsDefaults(module.parser.javascript, {
futureDefaults
});
Expand Down
11 changes: 0 additions & 11 deletions lib/dependencies/ImportMetaPlugin.js
Expand Up @@ -65,17 +65,6 @@ class ImportMetaPlugin {
parser.state.module.addPresentationalDependency(dep);
return true;
});
parser.hooks.unhandledExpressionMemberChain
.for("import.meta")
.tap("ImportMetaPlugin", (expr, members) => {
const dep = new ConstDependency(
`${importMetaName}${propertyAccess(members, 0)}`,
expr.range
);
dep.loc = expr.loc;
parser.state.module.addPresentationalDependency(dep);
return true;
});
return;
}

Expand Down

0 comments on commit 4714fb5

Please sign in to comment.