From fc87c009806dcc98867f6b58efe29b042aa01dee Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 18 May 2026 23:10:59 +0800 Subject: node: update --- node_modules/webpack/lib/schemes/FileUriPlugin.js | 49 ----------------------- 1 file changed, 49 deletions(-) delete mode 100644 node_modules/webpack/lib/schemes/FileUriPlugin.js (limited to 'node_modules/webpack/lib/schemes/FileUriPlugin.js') diff --git a/node_modules/webpack/lib/schemes/FileUriPlugin.js b/node_modules/webpack/lib/schemes/FileUriPlugin.js deleted file mode 100644 index 453abbd3..00000000 --- a/node_modules/webpack/lib/schemes/FileUriPlugin.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - -"use strict"; - -const { URL, fileURLToPath } = require("url"); -const { NormalModule } = require(".."); - -/** @typedef {import("../Compiler")} Compiler */ - -class FileUriPlugin { - /** - * Apply the plugin - * @param {Compiler} compiler the compiler instance - * @returns {void} - */ - apply(compiler) { - compiler.hooks.compilation.tap( - "FileUriPlugin", - (compilation, { normalModuleFactory }) => { - normalModuleFactory.hooks.resolveForScheme - .for("file") - .tap("FileUriPlugin", resourceData => { - const url = new URL(resourceData.resource); - const path = fileURLToPath(url); - const query = url.search; - const fragment = url.hash; - resourceData.path = path; - resourceData.query = query; - resourceData.fragment = fragment; - resourceData.resource = path + query + fragment; - return true; - }); - const hooks = NormalModule.getCompilationHooks(compilation); - hooks.readResource - .for(undefined) - .tapAsync("FileUriPlugin", (loaderContext, callback) => { - const { resourcePath } = loaderContext; - loaderContext.addDependency(resourcePath); - loaderContext.fs.readFile(resourcePath, callback); - }); - } - ); - } -} - -module.exports = FileUriPlugin; -- cgit v1.2.3