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

Inconsistent path resolution for references in HTML #17910

Open
7 tasks done
sapphi-red opened this issue Aug 21, 2024 · 1 comment
Open
7 tasks done

Inconsistent path resolution for references in HTML #17910

sapphi-red opened this issue Aug 21, 2024 · 1 comment
Labels
feat: html inconsistency Inconsistency between dev & build p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@sapphi-red
Copy link
Member

Describe the bug

The following cases doesn't work in dev, but works in build:

<script type="module" src="@/main.js"></script> <!-- alias that doesn't start with / -->
<script type="module" src="C:/absolute/path/to/main.js"></script> <!-- absolute path on Windows 1 -->
<script type="module" src="C:\absolute\path\to\main.js"></script> <!-- absolute path on Windows 2 -->

Reproduction

https://stackblitz.com/edit/vitejs-vite-bdueaz?file=vite.config.js,index.html&terminal=dev (for the first case)

Steps to reproduce

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P
    Memory: 16.99 GB / 31.62 GB
  Binaries:
    Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.8.1 - C:\Program Files\nodejs\npm.CMD
    bun: 1.1.21 - ~\AppData\Local\Microsoft\WinGet\Links\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    vite: ^5.4.2 => 5.4.2

Used Package Manager

npm

Logs

No response

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: html inconsistency Inconsistency between dev & build p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant