-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (34 loc) · 1.05 KB
/
vite.config.ts
File metadata and controls
35 lines (34 loc) · 1.05 KB
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
import path from "node:path";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
// Shim for @safe-global/safe-singleton-factory which uses dynamic require()
// that doesn't work with Vite bundling
// see https://github.com/gnosispay/ui/pull/189
"@safe-global/safe-singleton-factory": path.resolve(__dirname, "./src/shims/safe-singleton-factory.ts"),
},
},
optimizeDeps: {
// Force Vite to pre-bundle this package
include: ["@gnosispay/account-kit"],
},
build: {
commonjsOptions: {
// Include JSON files when transforming CJS to ESM
include: [/node_modules/],
},
},
server: {
allowedHosts: ["verified-pug-renewing.ngrok-free.app"],
cors: {
origin: "https://app.safe.global",
allowedHeaders: ["Content-Type", "Authorization"],
},
},
});