Comparing version
@@ -132,3 +132,3 @@ import VirtualModulesPlugin from "webpack-virtual-modules"; | ||
__vfs?: VirtualModulesPlugin; | ||
__vfsModules?: Map<string, Promise<string>>; | ||
__vfsModules?: Map<string, Promise<string>> | Set<string>; | ||
__virtualModulePrefix: string; | ||
@@ -135,0 +135,0 @@ } |
@@ -1553,3 +1553,3 @@ import { normalizeObjectHook, parse, toArray } from "./context-D49cMElb.js"; | ||
//#endregion | ||
//#region node_modules/.pnpm/tsdown@0.11.5_publint@0.3.5_typescript@5.8.3_unplugin-unused@0.5.0_vue-tsc@2.2.10_typescript@5.8.3_/node_modules/tsdown/esm-shims.js | ||
//#region node_modules/.pnpm/tsdown@0.11.7_publint@0.3.5_typescript@5.8.3_unplugin-unused@0.5.0_vue-tsc@2.2.10_typescript@5.8.3_/node_modules/tsdown/esm-shims.js | ||
const getFilename = () => fileURLToPath(import.meta.url); | ||
@@ -1581,3 +1581,4 @@ const getDirname = () => path.dirname(getFilename()); | ||
vfs.apply(compiler); | ||
plugin.__vfsModules = new Map(); | ||
const vfsModules = new Map(); | ||
plugin.__vfsModules = vfsModules; | ||
plugin.__vfs = vfs; | ||
@@ -1614,7 +1615,7 @@ compiler.hooks.compilation.tap(plugin.name, (compilation, { normalModuleFactory }) => { | ||
if (!fs.existsSync(resolved)) { | ||
if (!plugin.__vfsModules.has(resolved)) { | ||
if (!vfsModules.has(resolved)) { | ||
const fsPromise = vfs.writeModule(resolved); | ||
plugin.__vfsModules.set(resolved, fsPromise); | ||
vfsModules.set(resolved, fsPromise); | ||
await fsPromise; | ||
} else await plugin.__vfsModules.get(resolved); | ||
} else await vfsModules.get(resolved); | ||
resolved = encodeVirtualModuleId(resolved, plugin); | ||
@@ -1722,3 +1723,4 @@ } | ||
} | ||
plugin.__vfsModules = new Map(); | ||
const vfsModules = new Set(); | ||
plugin.__vfsModules = vfsModules; | ||
plugin.__vfs = vfs; | ||
@@ -1769,5 +1771,5 @@ const resolverPlugin = { apply(resolver) { | ||
// webpack virtual module should pass in the correct path | ||
if (!plugin.__vfsModules.has(resolved)) { | ||
if (!vfsModules.has(resolved)) { | ||
plugin.__vfs.writeModule(resolved, ""); | ||
plugin.__vfsModules.set(resolved, Promise.resolve("")); | ||
vfsModules.add(resolved); | ||
} | ||
@@ -1774,0 +1776,0 @@ } |
{ | ||
"name": "unplugin", | ||
"type": "module", | ||
"version": "2.3.3", | ||
"packageManager": "pnpm@10.10.0", | ||
"version": "2.3.4", | ||
"packageManager": "pnpm@10.11.0", | ||
"description": "Unified plugin system for build tools", | ||
@@ -56,4 +56,4 @@ "license": "MIT", | ||
"@farmfe/core": "^1.7.5", | ||
"@rspack/cli": "^1.3.9", | ||
"@rspack/core": "^1.3.9", | ||
"@rspack/cli": "^1.3.10", | ||
"@rspack/core": "^1.3.10", | ||
"@types/fs-extra": "^11.0.4", | ||
@@ -76,3 +76,3 @@ "@types/node": "^22.15.17", | ||
"simple-git-hooks": "^2.13.0", | ||
"tsdown": "^0.11.5", | ||
"tsdown": "^0.11.7", | ||
"typescript": "~5.8.3", | ||
@@ -79,0 +79,0 @@ "unloader": "^0.4.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
185685
0.03%4854
0.08%