79324613

Date: 2025-01-02 18:16:52
Score: 1
Natty:
Report link

When you build your project it doesn't include anything outside of the src folder. I recently gave a not so good solution to this question about static content where I suggested putting the assets in a public dir at the root but as @Brunnerh pointed out: "The files will not be served with caching headers because the file name is always the same (otherwise you could not properly update the files later)", while his answer solved that issue:

You can import the images via glob import and use that mapping to look up the asset URL.

This is all to explain why your app breaks when building. The solution would be to put your assets within the src folder, maybe in src/lib/static that way you can upload to $lib/static and maybe look into the $lib/server/ directory if you want to implement some server logic to protect those files.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Brunnerh
  • Starts with a question (0.5): When you
  • Low reputation (0.5):
Posted by: Jorge Linares