diff --git a/packages/kit/src/vite/build/utils.js b/packages/kit/src/vite/build/utils.js index 1596701885db..04e120c4d02f 100644 --- a/packages/kit/src/vite/build/utils.js +++ b/packages/kit/src/vite/build/utils.js @@ -94,6 +94,7 @@ export const get_default_config = function ({ config, input, ssr, outDir }) { base: assets_base(config.kit), build: { cssCodeSplit: true, + // don't use the default name to avoid collisions with 'static/manifest.json' manifest: 'vite-manifest.json', outDir, polyfillModulePreload: false, diff --git a/packages/kit/src/vite/index.js b/packages/kit/src/vite/index.js index 02094db71cf7..1701b77417a6 100644 --- a/packages/kit/src/vite/index.js +++ b/packages/kit/src/vite/index.js @@ -428,6 +428,10 @@ function kit() { `See ${colors.bold().cyan('https://kit.svelte.dev/docs/adapters')} to learn how to configure your app to run on the platform of your choosing` ); } + + // avoid making the manifest available to users + fs.unlinkSync(`${paths.output_dir}/client/${vite_config.build.manifest}`); + fs.unlinkSync(`${paths.output_dir}/server/${vite_config.build.manifest}`); }, /**