-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
42 lines (41 loc) · 1021 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
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
/**
* @see https://vitejs.dev/config/
*/
export default defineConfig({
/**
* Defines global constant replacments
* @see https://vitejs.dev/config/shared-options.html#define
*/
define: {
global: "globalThis",
},
resolve: {
/**
* Polyfills nodejs imports
* @see https://vitejs.dev/config/shared-options.html#resolve-alias
*/
alias: {
process: "process/browser",
util: "util",
},
},
/**
* Enables react
* @see https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md
*/
plugins: [react()],
/**
* Enable cross site requests
* @see https://docs.safe.global/safe-core-aa-sdk/safe-apps/get-started#cors
*/
server: {
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET",
"Access-Control-Allow-Headers":
"X-Requested-With, content-type, Authorization",
},
},
});