From 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1 Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期二, 21 四月 2026 11:46:41 +0800
Subject: [PATCH] 推送

---
 node_modules/webpack/bin/webpack.js |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/node_modules/webpack/bin/webpack.js b/node_modules/webpack/bin/webpack.js
index ba71ec2..8e00c1a 100644
--- a/node_modules/webpack/bin/webpack.js
+++ b/node_modules/webpack/bin/webpack.js
@@ -57,9 +57,11 @@
 	} while (dir !== (dir = path.dirname(dir)));
 
 	// https://github.com/nodejs/node/blob/v18.9.1/lib/internal/modules/cjs/loader.js#L1274
-	// eslint-disable-next-line no-warning-comments
-	// @ts-ignore
-	for (const internalPath of require("module").globalPaths) {
+	const { globalPaths } =
+		/** @type {typeof import("module") & { globalPaths: string[] }} */
+		(require("module"));
+
+	for (const internalPath of globalPaths) {
 		try {
 			if (fs.statSync(path.join(internalPath, packageName)).isDirectory()) {
 				return true;
@@ -81,6 +83,7 @@
 
 	const pkgPath = require.resolve(`${cli.package}/package.json`);
 
+	/** @type {Record<string, EXPECTED_ANY> & { type: string, bin: Record<string, string> }} */
 	const pkg = require(pkgPath);
 
 	if (pkg.type === "module" || /\.mjs/i.test(pkg.bin[cli.binName])) {

--
Gitblit v1.9.3