cannot use stub with `file://` protocol and esno (WSL2)
MarvinXu opened this issue · comments
Environment
Win 11, WSL2
unbuild@2.0.0
Reproduction
- create project following usage in Ubuntu WSL2
- run
npx unbuild --stub
Describe the bug
Output file dist/index.mjs
have incorrect filepath of jiti
( file://
points to Windows file system while the following path is in Linux subsystem)
import jiti from "file:///home/marv/.npm/_npx/97e73b3cab55bb68/node_modules/jiti/lib/index.js";
...
Additional context
No response
Logs
No response
fixed?
it just can't be resolved in other projects.
Okay interesting. It seems esno does not likes import with file://
protocol. /cc @antfu just to be in context.
(opened to investigate if we can do anything to mitigate this)