-
-
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
fix: do not copy vite manifest instead of removing during build #10782
Conversation
🦋 Changeset detectedLatest commit: 64d187d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure this is a good idea. It kind of seems like it'd just be papering over whatever the root cause is. I don't know what's going to happen if you run two builds in parallel even if you leave that file in place. And I don't expect this would actually fix the issue anyway because you're not moving it to happen very much later. Finally, I'm worried that some adapter might copy files in their own custom way and then be left with the manifest in their build
Yeah, I have to agree. I had these two concerns as well.
However,
It should address the issue if we leave the manifest in
If they did have a custom copying process, maybe they should also have the responsibility of not copying the Vite files over. Alternatively, we could move the Vite build artefacts outside the client and server bundle directories into its own thing? (and rename them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right. Thanks for clarifying. I think that's probably an okay idea then. There have been times where I would have found it very helpful to have the Vite manifest for debugging, so leaving it in the .svelte-kit
output and then just having the adapter skip copying it could be helpful
fixes #10268
I can't reproduce the original issue on my system but this simple fix makes it worth leaving the Vite manifest file alone?
We can just remove it when copying files so it doesn't get exposed publicly. #8360 #8815
This would also make it forwards compatible with whatever vite files get generated in the future since Vite 5 will put all these files in the
.vite
folder. vitejs/vite#9636 (comment) https://github.com/vitejs/vite/pull/14230/filesPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.