-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: remove unused vite manifest for consistent build reproducibili…
…ty (#1670) # Motivation No `vite-manifest.json`, no build reproducibility issue 😉. See commented code for details. # Changes - delete `vite-manifest.json` with a post build script - remove `make-reproducible` as it becomes unused # Notes I opened today two issues in SvelteKit repo to share what we discovered: - sveltejs/kit#8290 - sveltejs/kit#8291
- Loading branch information
1 parent
bc149c2
commit 56c59b4
Showing
3 changed files
with
28 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env node | ||
import { rmSync } from "fs"; | ||
import { join } from "path"; | ||
|
||
const dir = join(process.cwd(), "public"); | ||
const viteManifestFile = join(dir, "vite-manifest.json"); | ||
|
||
const deleteViteManifest = () => | ||
rmSync(viteManifestFile, { | ||
force: true, | ||
}); | ||
|
||
/** | ||
* We are facing various issues with build reproducibility all linked with the `vite-manifest.json` that is generated by SvelteKit + ViteJS. | ||
* | ||
* Those open are: | ||
* - https://github.com/sveltejs/kit/issues/8290 | ||
* - https://github.com/sveltejs/kit/issues/8291 | ||
* | ||
* We can solve above issues with workarounds, but, as we actually do not need the `vite-manifest.json` as we do not process it in the backend, we can just remove it. | ||
* See https://vitejs.dev/guide/backend-integration.html for some explanation about the usage of the file. | ||
* | ||
* Note that we do this "manually" because SvelteKit has currently no option to disable the script. | ||
*/ | ||
deleteViteManifest(); |
This file was deleted.
Oops, something went wrong.