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 have set alias '~/': `${path.resolve(__dirname, 'src')}/`
It's perfect in import declaration
But I got a file path src/assets/file and it resolved incorrectly in <img src="~/assets/file">( result <img src="assets/file">)
On the other hand, It works fine in webpack
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.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I have set alias
'~/': `${path.resolve(__dirname, 'src')}/`
It's perfect in
import
declarationBut I got a file path
src/assets/file
and it resolved incorrectly in<img src="~/assets/file">
( result<img src="assets/file">
)On the other hand, It works fine in webpack
Reproduction
https://stackblitz.com/edit/vitejs-vite-8mvyad
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: