-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
38 lines (36 loc) · 1.08 KB
/
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
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default ({ mode }) => {
Object.assign(process.env, loadEnv(mode, process.cwd()));
return defineConfig({
plugins: [react()],
define: {
"process.env": {
NX_RIVET_KEY: process.env.VITE_RIVET_KEY,
NX_GRAPH_API_KEY_MAINNET: process.env.VITE_GRAPH_API_KEY_MAINNET,
NX_INFURA_PROJECT_ID: process.env.VITE_INFURA_PROJECT_ID,
NX_ETHERSCAN_KEY: process.env.VITE_ETHERSCAN_KEY,
NX_WALLET_CONNECT_ID: process.env.VITE_WALLET_CONNECT_ID,
NX_OPTIMISM_ALCHEMY_KEY: process.env.VITE_OPTIMISM_ALCHEMY_KEY,
NX_ARBITRUM_ALCHEMY_KEY: process.env.VITE_ARBITRUM_ALCHEMY_KEY,
NX_SEPOLIA_RPC: process.env.VITE_SEPOLIA_RPC,
NODE_ENV: "16.6.0",
},
},
optimizeDeps: {
esbuildOptions: {
target: "es2020",
define: {
global: "globalThis",
},
supported: {
bigint: true,
},
},
},
build: {
target: ["es2020"],
},
});
};