title: How to configure Svelte project with Vite so that the static files are not copied during the build?
body: <p>In a NORMAL Svelte project (no SvelteKit) the static files are in the <code>public</code> directory and when running <code>npm run build</code> (<code>rollup -c</code>) the <code>src</code> folder is compiled into <code>public/build</code> and the public folder can then be hosted somewhere.</p>
  <p>I now switched (an already existing) Svelte project to Vite and the static files are still under <code>public</code> but when running <code>npm run build</code> (<code>vite build</code>), everything is bundled into the <code>dist</code> directory. So all the files in the <code>public</code> directory are actually copied and exist twice in the project. Which means when changing or adding something (which doesn't effect the app logic) the project needs to be rebuild before it can be redeployed.</p>
  <p>Can this be changed via the configuration, that either all compiled files are added again to the <code>public</code> directory or that the static files reside directly inside <code>dist</code> and nothing is copied during the build process?</p>
  <p>Edit: The project should still be able to be run in dev mode <code>npm run dev</code> (<code>vite</code>) with the assets being served</p>