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
I'm developing a monorepo that imports different packages that may be on different windows volumes. Some of the packages try to load images but fail when the vite root is on a different volume. However, if I move all packages to the same drive, everything works fine.
Example of error message in the browser's console:
GET http://127.0.0.1:5173/@fs/d:/subrepo/image.png 404 (Not Found)
Error message with --debug:
vite:html-fallback Not rewriting GET /%2Fsubrepo2%2Fimage.png because the path includes a dot (.) character. +72ms
Reproduction
You need a windows machine with multiple drive letters. I'm providing a simple example below.
Steps to reproduce
1. Create the following files and folders:
d:\subrepo\index.ts:
import imgUrl from "./image.png";
export default function() {
const img = new Image();
img.src = imgUrl;
document.body.appendChild(img);
}
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
I'm developing a monorepo that imports different packages that may be on different windows volumes. Some of the packages try to load images but fail when the vite root is on a different volume. However, if I move all packages to the same drive, everything works fine.
Example of error message in the browser's console:
Error message with --debug:
Reproduction
You need a windows machine with multiple drive letters. I'm providing a simple example below.
Steps to reproduce
1. Create the following files and folders:
d:\subrepo\index.ts
:c:\mainrepo\index.ts
:c:\mainrepo\index.html
:Also put an arbitrary image as "image.png" into
d:\subrepo
.You should have the following folders and files:
2. In
c:\mainrepo
run the commands:3. Visit
127.0.0.1:5173
Try it also with the two folders on the same drive.
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: