Skip to content

Commit

Permalink
fix: pass publicDir in ssr (#9565)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Mar 30, 2023
1 parent 369e7d6 commit 5fa7820
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sharp-wolves-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: pass `publicDir` Vite config in SSR
3 changes: 2 additions & 1 deletion packages/kit/src/exports/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,11 +564,12 @@ function kit({ svelte_config }) {
preserveEntrySignatures: 'strict'
},
ssrEmitAssets: true,
copyPublicDir: !ssr,
target: ssr ? 'node16.14' : undefined,
// don't use the default name to avoid collisions with 'static/manifest.json'
manifest: 'vite-manifest.json'
},
publicDir: ssr ? false : kit.files.assets,
publicDir: kit.files.assets,
worker: {
rollupOptions: {
output: {
Expand Down

0 comments on commit 5fa7820

Please sign in to comment.