I would like the files that live in static/ to be served at e.g. static/
instead of at /
.
I tried just changing the polka "base" in the call to "use(sirv
"... but it seems the sapper middleware interferes and makes it 404.
I would like the files that live in static/ to be served at e.g. static/
instead of at /
.
I tried just changing the polka "base" in the call to "use(sirv
"... but it seems the sapper middleware interferes and makes it 404.
You could try just putting everything in a project_root/static/static
directory instead. That should work, though it might feel a little awkward.
Sapper expects that the static
folder will be served as is, and bases things like the service worker manifest on the contents of this folder. This is probably a bit brittle and should be configurable — if you have suggestions for how this area could be improved, feel free to raise an issue on https://github.com/sveltejs/sapper.