-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvite.config.ts
34 lines (33 loc) · 893 Bytes
/
vite.config.ts
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
import { svelte } from "@sveltejs/vite-plugin-svelte"
import { defineConfig } from "vite"
import unocss from "unocss/vite"
import transformerDirectives from "@unocss/transformer-directives"
import preset_default from "unocss/preset-uno"
import preset_icons from "unocss/preset-icons"
import wasm_thing from "vite-plugin-wasm"
import top_level_await from "vite-plugin-top-level-await"
export default defineConfig({
base: "",
plugins: [
svelte(),
unocss({
presets: [preset_default(), preset_icons()],
transformers: [transformerDirectives()],
}),
wasm_thing(),
top_level_await(),
],
build: {
rollupOptions: {
input: {
main: "./index.html",
bg: "./src/bg.ts",
},
output: {
entryFileNames: `[name].js`,
chunkFileNames: `[name].js`,
assetFileNames: `assets/[name].[ext]`,
},
},
},
})