-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Vite Plugin: emitted files don't show up in the build output #5346
Comments
@userquin has been working to make https://github.com/antfu/vite-plugin-pwa work with SvelteKit and has it pretty well figured out. There are two known issues: #5308 and #5306. I have a PR out to fix the first one already Is there a reason you don't just contribute to |
Thank you. I'll take a look at vite-plugin-pwa. |
I just took some time to look at antfu's repo, and the strategy they are using, is just copying the service worker and manifest into the build output. IMO it would be much better to make use of vite's/rollup's As I see it, vite plugins at the moment are kinda broken, which #5306 seeks to fix. |
@leonhma we've changed it since the sveltekit plugin was setting the webmanifest file into the immutable folder, originally we had the output pointing to the .sveltekit folder, check the history |
@leonhma I'm digging into why UnoCSS doesn't scan app.html in a SvelteKit project but it does just fine in a vite-svelte project. I've made minimal repros of the Somehow vite-pwa is using this hook in SvelteKit though so it looks like there is some way to get a Vite plugin to recognize Is there a maintainer who can help explain how to point Vite's |
@leonhma I have the exact same issue with you, and trying |
Describe the bug
I am currently writing a plugin that is supposed to generate the manifest and images needed for a pwa, and the user can bring their own service worker, in order to be as customisable as possible. The icons are resized into a bunch of different variants and then emitted using
emitFiles
. Prior function doesn't give any errors and returns an resolveId that resolves to a valid URL. Everything seems to work, but in the end, nothing turns up in the build output, and when requesting_app/manifest.webmanifest
or any of the images the server responds with the 404 page.I have also tested this using a plain vue3 app, and it works flawlessly.
Reproduction
Since I don't have the plugin published, you will have to also clone https://github.com/leonhma/vite-plugin-webmanifest.git and use
yarn link
. Here is the original relevant plugin code:Here's a URL to the repo for reproduction: https://github.com/leonhma/repro-sveltekit-vite-emitfiles.git
Logs
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: