-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.js
41 lines (39 loc) · 781 Bytes
/
build.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
40
41
#!/usr/bin/env node
import { build } from "vite";
console.debug(`Building configurator...`);
// https://vitejs.dev/config/
await build({
build: {
minify: false,
target: "node20",
ssr: true,
rollupOptions: {
input: ["src/main.ts"],
},
},
ssr: {
// Anything NOT 'node:' will be bundled.
noExternal: /^(?!node:)/,
},
});
console.debug(`Building runtime...`);
// https://vitejs.dev/config/
await build({
build: {
outDir: "dist/runtime",
minify: false,
target: "esnext",
ssr: true,
rollupOptions: {
input: [
"src/runtime/main.ts",
"src/runtime/pre.ts",
"src/runtime/post.ts",
],
},
},
ssr: {
// Anything NOT 'node:' will be bundled.
noExternal: /^(?!node:)/,
},
});