Closed designcouch closed 2 years ago
I found a workaround for now. Importing the url and then declaring it in data before using it in the component works. Not perfect, but it makes this issue less urgent.
Yeah, I do that too; I'm not entirely sure how to achieve that, to be honest. I might try to read something about it. I have the feeling is not something I can do from the plugin but more something that has to be done from each project compiler.
Judging by some research I did, and by this Github issue, it looks like a compiler problem, not something I can take care of. Please report to me in case you have a fix or an idea. Thanks
Description
When using relative urls passed to the src and placeholder-src properties like this:
placeholder-src="@/assets/images/placeholder.jpg" src="@/assets/images/full-image.jpg"
the url I'm passing is read as a simple string and results in a 404 error for the image.I noted the pull request a few days ago, but that user is utilizing webpack, and I'm using vite. Not entirely sure how to apply his solution in my situation.
Expected behavior
The url should be read correctly when using the
@/
syntaxActual behavior
Using a relative URL in Vue3 results in a 404 error when the code is run.
Environment
Run this command in the project folder and fill in the result:
npm ls vue-progressive-image
: vue-progressive-image@4.0.0-beta.10Then, specify: