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
Describe the bug
When packaging, the value passed in by the url () function in css points to the wrong path.
To Reproduce
The reproduction operation is very simple. I use the url () function in css to reference files. When packaging, the function path starts from '/', not './'. In fact, when the path is'/', static resources cannot be obtained.
CSS file:
After packaging:
console:
Network:
Expected behavior
background-image: url(../icon.png); -----> background-image:url(app:///img/icon.d957157f.png);
I want to:
background-image: url(../icon.png); -----> background-image:url(app://./img/icon.d957157f.png);
Environment (please complete the following information):
I wonder why "./" must be added after the protocol in path matching. For example: app://./index.html , not app://index.html (Unable to find resource).
If customFileProtocol is not configured, the url() function will go "/". That is, the path will be resolved to app://img/icon.75ahw75f1.png , but static resources cannot be obtained. <img alt="Vue logo" src="./assets/icon.png"> can operate normally
Describe the bug
When packaging, the value passed in by the url () function in css points to the wrong path.
To Reproduce
The reproduction operation is very simple. I use the url () function in css to reference files. When packaging, the function path starts from '/', not './'. In fact, when the path is'/', static resources cannot be obtained.
CSS file:
After packaging:
console:
Network:
Expected behavior
background-image: url(../icon.png); -----> background-image:url(app:///img/icon.d957157f.png);
I want to:
background-image: url(../icon.png); -----> background-image:url(app://./img/icon.d957157f.png);
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: