A repository for a FoundryVTT plugin for Kingmaker homebrew.
1import { defineConfig } from "vite";
2import { svelte, vitePreprocess } from "@sveltejs/vite-plugin-svelte";
3import config from "./config";
4
5export default defineConfig({
6 plugins: [
7 svelte({
8 preprocess: vitePreprocess({
9 script: true
10 })
11 })
12 ],
13 build: {
14 minify: "terser",
15 terserOptions: {
16 mangle: true,
17 sourceMap: true,
18 compress: {
19 toplevel: true,
20 sequences: false
21 }
22 },
23 lib: {
24 "entry": "src/main.ts",
25 name: "app",
26 fileName: "main",
27 formats: [
28 "iife"
29 ]
30 },
31 watch: {
32 buildDelay: 1000
33 },
34 sourcemap: true,
35 outDir: config.outdir,
36 emptyOutDir: true
37 }
38});