Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: webpack / rspack load virtual module with '/' prefix on windows platform #422

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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, '/')

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