GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — use faster statement type check · webpack/webpack@41b6887

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/dependencies
    • HarmonyDetectionParserPlugin.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/dependencies/HarmonyDetectionParserPlugin.js‎

Copy file name to clipboardExpand all lines: lib/dependencies/HarmonyDetectionParserPlugin.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ module.exports = class HarmonyDetectionParserPlugin {
1313
const isStrictHarmony = parser.state.module.type === "javascript/esm";
1414
const isHarmony =
1515
isStrictHarmony ||
16-
ast.body.some(statement => {
17-
return /^(Import|Export).*Declaration$/.test(statement.type);
18-
});
16+
ast.body.some(statement => statement =>
17+
statement.type === "ImportDeclaration" ||
18+
statement.type === "ExportDefaultDeclaration" ||
19+
statement.type === "ExportNamedDeclaration"
20+
);
1921
if (isHarmony) {
2022
const module = parser.state.module;
2123
const compatDep = new HarmonyCompatibilityDependency(module);

0 commit comments

Comments
0 (0)
You are visitor 01402605 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.