Skip to content

Instantly share code, notes, and snippets.

@kuc-arc-f
Created January 15, 2024 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kuc-arc-f/0227b5630f482d8974929d820996590d to your computer and use it in GitHub Desktop.
Save kuc-arc-f/0227b5630f482d8974929d820996590d to your computer and use it in GitHub Desktop.
vite.config.ts, svelte + vite sample
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
build: {
lib: {
entry: [
'./src/main.ts',
],
formats: ['es'],
fileName: '[name]',
},
rollupOptions: {
output: {
dir: './dist/static'
}
},
emptyOutDir: false,
copyPublicDir: false
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment