forked from collect-intel/osccai-simulation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
29 lines (28 loc) · 726 Bytes
/
Copy pathvite.config.js
File metadata and controls
29 lines (28 loc) · 726 Bytes
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
import { defineConfig } from "vite"
import wasm from "vite-plugin-wasm"
import { nodePolyfills } from "vite-plugin-node-polyfills"
export default defineConfig({
// ...other config settings
plugins: [nodePolyfills({ globals: { Buffer: true } }), wasm()],
server: {
headers: {
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
},
},
build: {
outDir: "./build",
minify: false,
target: "es2022",
},
optimizeDeps: {
exclude: ["@sqlite.org/sqlite-wasm", "quickjs-emscripten"],
esbuildOptions: {
// Node.js global to browser globalThis
define: {
global: "globalThis",
},
},
},
publicDir: "public",
})