-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assets should be emitted in SSR mode #11429
Labels
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
If my client-side JavaScript imports an image...
...then at build time the asset is hashed, the import is replaced with
const potato = '/assets/potato-xyz123.jpg'
, and the file is written out to that directory.This does not happen for an
ssr
build. Theimport
replacement happens, but nopotato-xyz123.jpg
file is written. Since it's often the case that some code is part of the server build but not part of the client build, this results in missing assets, causing bugs like sveltejs/kit#5240.Reproduction
https:/Rich-Harris/vite-ssr-assets
Steps to reproduce
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: