-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
39 lines (37 loc) · 1 KB
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-FileCopyrightText: 2024 Shota FUJI <pockawoooh@gmail.com>
//
// SPDX-License-Identifier: Apache-2.0
import { gleam } from "@pocka/rollup-plugin-gleam";
import { defineConfig } from "vite";
export default defineConfig({
root: new URL("./src", import.meta.url).pathname,
build: {
outDir: "../dist",
emptyOutDir: true,
rollupOptions: {
input: {
main: new URL("./src/index.html", import.meta.url).pathname,
builder: new URL("./src/builder/index.html", import.meta.url).pathname,
castle: new URL("./src/castle/index.html", import.meta.url).pathname,
simple: new URL("./src/simple/index.html", import.meta.url).pathname,
},
},
},
optimizeDeps: {
exclude: [
// Without this, Vite can't load WASM file
"@sqlite.org/sqlite-wasm",
"@diffusionstudio/vits-web",
],
},
resolve: {
alias: {
"@": new URL("./src", import.meta.url).pathname,
},
},
worker: {
// onnxruntime-web is not compatible with "iife" format (default value)
format: "es",
},
plugins: [gleam()],
});