diff --git a/.changeset/tame-kangaroos-film.md b/.changeset/tame-kangaroos-film.md new file mode 100644 index 000000000000..022cf57590e6 --- /dev/null +++ b/.changeset/tame-kangaroos-film.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +fix: don't copy public folder in service worker build diff --git a/.gitignore b/.gitignore index f53c51190a59..679d1c89e690 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ vite.config.js.timestamp-* .vercel .test-tmp symlink-from +.idea/ diff --git a/packages/kit/src/exports/vite/build/build_service_worker.js b/packages/kit/src/exports/vite/build/build_service_worker.js index b5493f687912..89387ae03cd0 100644 --- a/packages/kit/src/exports/vite/build/build_service_worker.js +++ b/packages/kit/src/exports/vite/build/build_service_worker.js @@ -79,8 +79,9 @@ export async function build_service_worker( outDir: `${out}/client`, emptyOutDir: false }, - define: vite_config.define, configFile: false, + define: vite_config.define, + publicDir: false, resolve: { alias: [...get_config_aliases(kit), { find: '$service-worker', replacement: service_worker }] }