Skip to content
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

Do we really need vite-manifest.json in publicly accessible build dir? #8360

Closed
frederikhors opened this issue Jan 6, 2023 · 2 comments · Fixed by #8815
Closed

Do we really need vite-manifest.json in publicly accessible build dir? #8360

frederikhors opened this issue Jan 6, 2023 · 2 comments · Fixed by #8815
Labels
bug Something isn't working low hanging fruit ready to implement please submit PRs for these issues!
Milestone

Comments

@frederikhors
Copy link
Contributor

frederikhors commented Jan 6, 2023

Describe the problem

I'm using latest stable Kit ("@sveltejs/kit": "1.0.3") and "@sveltejs/adapter-static": "1.0.0" with SSR disabled at all.

After npm run build I get a vite-manifest.json file in build dir.

Since this file is then publicly served to the world, I would like to understand if it is strictly necessary or if we can do without it.

Thanks for your immense work!

@Rich-Harris
Copy link
Member

Honestly I'm a bit confused by this myself. It seems very odd that we should need to write this file to the filesystem, instead of having it be returned from vite.build. I would definitely be in favour of removing it, though it might theoretically cause issues for other Vite plugins that need to read the manifest for whatever reason — @benmccann might have a better idea about whether we can safely get rid of it.

@Rich-Harris Rich-Harris added bug Something isn't working low hanging fruit ready to implement please submit PRs for these issues! labels Jan 28, 2023
@Rich-Harris Rich-Harris added this to the soon milestone Jan 28, 2023
@benmccann benmccann changed the title Do we really need vite-manifest.json in pubblicly accessible build dir? Do we really need vite-manifest.json in publicly accessible build dir? Jan 28, 2023
@benmccann
Copy link
Member

I thought we were removing it in the very final build hook. We were doing that at some point I believe. Perhaps it got lost in some refactoring?

A longer-term fix would probably be to make improvements in Vite: vitejs/vite#9636

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low hanging fruit ready to implement please submit PRs for these issues!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants