-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Open
Labels
feat: htmlinconsistencyInconsistency between dev & buildInconsistency between dev & buildp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
Steps to reproduce
- Go to https://stackblitz.com/edit/vitejs-vite-jbosbq
- Run
npm run build && npm run preview - Check path for
hrefattribute:<head> ... <link rel="icon" type="image/svg+xml" href="/admin/vite.svg"> <link rel="manifest" href="/manifest.json"> 👈✅ ... </head>
- Run
npm run dev - Check path for
hrefattribute:<head> ... <link rel="icon" type="image/svg+xml" href="/admin/vite.svg"> <link rel="manifest" href="/admin/manifest.json"> 👈❌ ... </head>
In the example I'd expect asset paths in index.html to behave the same in development as when building for production - i.e. that the provided base (/admin/) only gets prefixed to assets found in public/ (i.e. vite.svg) and that paths for non-existing files (i.e. manifest.json) is left untouched.
Reproduction
https://stackblitz.com/edit/vitejs-vite-jbosbq
System Info
System:
OS: Linux 5.0 undefined
CPU: (4) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.17.0 - /usr/local/bin/npm
npmPackages:
vite: ^3.1.0 => 3.1.3Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- 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.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: htmlinconsistencyInconsistency between dev & buildInconsistency between dev & buildp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)