Skip to content

Commit

Permalink
feat: respect resolved id instead of raw request id (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxy-yz committed Mar 24, 2022
1 parent 7da6d1d commit 468da3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webpack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function getWebpackPlugin<UserOptions = {}> (
// if the resolved module is not exists,
// we treat it as a virtual module
if (!fs.existsSync(resolved)) {
resolved = plugin.__virtualModulePrefix + id
resolved = plugin.__virtualModulePrefix + backSlash(resolved)
// webpack virtual module should pass in the correct path
plugin.__vfs!.writeModule(resolved, '')
plugin.__vfsModules!.add(resolved)
Expand Down

0 comments on commit 468da3e

Please sign in to comment.