unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more
https://unplugin.unjs.io
MIT License
3.09k stars 114 forks source link

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

Open tmg0 opened 1 month ago

tmg0 commented 1 month ago

Resolves: #421

Changes:

id = normalizeAbsolutePath(id)
  if (id.startsWith('\\'))
    id = id.replace(/\\/g, '/')
pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

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

commit: 077d35c