Skip to content

Commit

Permalink
prevent Vite from copying static assets if directory is called public -
Browse files Browse the repository at this point in the history
fixes #587
  • Loading branch information
Rich-Harris committed Mar 4, 2022
1 parent 4c5322a commit 5c12e15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/brave-toys-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Prevent Vite from copying static assets if directory is called "public"
5 changes: 4 additions & 1 deletion packages/kit/src/core/build/build_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ export async function build_client({
hydratable: !!config.kit.browser.hydrate
}
})
]
],
// prevent Vite copying the contents of `config.kit.files.assets`,
// if it happens to be 'public' instead of 'static'
publicDir: false
});

print_config_conflicts(conflicts, 'kit.vite.', 'build_client');
Expand Down

0 comments on commit 5c12e15

Please sign in to comment.