fix(rspack): plugin.__vfs is undefined (#439)

This commit is contained in:
信鸽 2024-11-28 20:47:47 +08:00 committed by GitHub
parent e35f8899d1
commit 3c4b79e6f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,6 +69,7 @@ export function getRspackPlugin<UserOptions = Record<string, never>>(
const vfs = new FakeVirtualModulesPlugin(plugin)
vfs.apply(compiler)
plugin.__vfsModules = new Set()
plugin.__vfs = vfs
compiler.hooks.compilation.tap(plugin.name, (compilation, { normalModuleFactory }) => {
normalModuleFactory.hooks.resolve.tapPromise(plugin.name, async (resolveData) => {