Skip to content

Conversation

@tmg0
Copy link

@tmg0 tmg0 commented Sep 23, 2024

Resolves: #421

  • Replace all \ with / after normalizeAbsolutePath function when the virtual module id has a prefix with / in webpack / rspack load function
  • Add resolvedId prefix in test/fixtures/virtual-module/unplugin.js

Changes:

id = normalizeAbsolutePath(id)
  if (id.startsWith('\\'))
    id = id.replace(/\\/g, '/')

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 25, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/unjs/unplugin@422

commit: 077d35c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webpack / rspack load virtual module id with / prefix on windows caused error

2 participants