You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
webpack / rspack load virtual module id with / prefix on windows caused error #421
When I try to load a virtual module with / prefix on windows, id path has been converted from / to \, and this issue caused unplugin-vue-router doesn't work with rspack and webpack
I have forked this repo and modify the test file in virtual-module
\__virtual\1\__virtual\2
C:\webpack-webpack-js-org-fy87xb\plugin\virtual.js:20
throw new Error(`Unexpected id: ${id}`)
^
Error: Unexpected id: \__virtual\1
at Object.load (C:\webpack-webpack-js-org-fy87xb\plugin\virtual.js:20:15)
at Object.load (C:\webpack-webpack-js-org-fy87xb\node_modules\.pnpm\unplugin-doctor@0.1.1\node_modules\unplugin-doctor\dist\index.cjs:5:524)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.load (C:\webpack-webpack-js-org-fy87xb\node_modules\.pnpm\unplugin@1.14.1\node_modules\unplugin\dist\webpack\loaders\load.js:130:15)
Activity
tmg0 commentedon Sep 25, 2024
I have created a demo for this issue, it works well on stackblitz and unix like platform:
But on windows, it was broken: