Skip to content

Commit

Permalink
delete manifest at end of build
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 11, 2022
1 parent 9430acd commit 4ea41dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/kit/src/vite/build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions packages/kit/src/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
},

/**
Expand Down

0 comments on commit 4ea41dc

Please sign in to comment.