-
-
Notifications
You must be signed in to change notification settings - Fork 349
/
Copy pathvite.config.ts
43 lines (42 loc) · 935 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
35
36
37
38
39
40
41
42
43
import { uvPath } from "@titaniumnetwork-dev/ultraviolet";
import solid from "solid-start/vite";
import { defineConfig } from "vite";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import { viteStaticCopy } from "vite-plugin-static-copy";
export default defineConfig({
plugins: [
viteStaticCopy({
targets: [
{
src: `${uvPath}/.`.replace(/\\/g, "/"),
dest: "uv"
},
{
src: "public/uv/uv.config.js",
dest: "uv"
},
{
src: "./out/.",
dest: "addon"
}
]
}),
nodePolyfills({
globals: {
Buffer: true,
global: true,
process: true
}
}),
solid({ ssr: false })
],
server: {
proxy: {
"^/bare/*": {
rewrite: (path: string) => path.replace(/^\/bare/, ""),
target: "http://localhost:8080/",
ws: true
}
}
}
});