vite-pwa / sveltekit

Zero-config PWA Plugin for SvelteKit
https://vite-pwa-org.netlify.app/frameworks/sveltekit
MIT License
318 stars 15 forks source link

Please document that images that are outside of `/static` will NOT build in production #78

Open rbozan opened 8 months ago

rbozan commented 8 months ago

https://github.com/vite-pwa/sveltekit/blob/86ba0de76f6a704ef749e7e08de6ff228d54357b/examples/sveltekit-ts-assets-generator/pwa-assets.config.ts#L24

Having the same file but then in a map outside of static like /images/favicon.svg will work in development mode but fail while building. This does not seem to be documented.

userquin commented 8 months ago

https://vite-pwa-org.netlify.app/guide/static-assets.html

publicDir in kit is static folder

rbozan commented 8 months ago

I don't know but I personally found it confusing. It's not stated here for example https://vite-pwa-org.netlify.app/frameworks/sveltekit.html#pwa-assets or https://github.com/vite-pwa/assets-generator (even though it's not Sveltekit specific). And it actually works in development mode without errors so that really didn't help either. Just talking from an user-perspective