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
.jpgformat and transform them to.webpat build time. The new.webpfiles should be stored understatic/postersand shown using<img src="poster/foo.webp">vite dev --host 0.0.0.0runs fine and everything works as expected.If I clear the
static/postersfolder 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 buildagain, the build passes...Reproduction
Here is an example of this in play -- multivac61/hvaderibio@6c33d82
Logs
No response
System Info
System: OS: macOS 13.3.1 CPU: (10) arm64 Apple M1 Pro Memory: 983.39 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 20.0.0 - ~/.nvm/versions/node/v20.0.0/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 9.6.4 - ~/.nvm/versions/node/v20.0.0/bin/npm Browsers: Chrome: 112.0.5615.121 Firefox: 112.0 Safari: 16.4 npmPackages: @sveltejs/adapter-auto: ^2.0.0 => 2.0.0 @sveltejs/adapter-static: ^2.0.2 => 2.0.2 @sveltejs/kit: ^1.15.7 => 1.15.7 svelte: ^3.58.0 => 3.58.0 vite: ^4.2.2 => 4.2.2Beta Was this translation helpful? Give feedback.
All reactions