Downloading assets at build time causes errors #9723
Unanswered
multivac61
asked this question in
Q&A
Replies: 2 comments
-
When I modify my
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for marking this as a discussion @benmccann. I appreciate that this may be more of a nuanced discussion, that is should you be able to download files into the static directory at build time and have them served. How can I achieve this? Do this step before running the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I want to download posters in
.jpg
format and transform them to.webp
at build time. The new.webp
files should be stored understatic/posters
and shown using<img src="poster/foo.webp">
vite dev --host 0.0.0.0
runs fine and everything works as expected.If I clear the
static/posters
folder before runningvite dev..
it also works as expected.If I clear the folder, and then run
vite build
, I get the following type of errorsI checked in the filesystem and the files are downloaded to the correct place.
If I run
vite build
again, the build passes...Reproduction
Here is an example of this in play -- multivac61/hvaderibio@6c33d82
Logs
No response
System Info
Beta Was this translation helpful? Give feedback.
All reactions