-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.mts
34 lines (33 loc) · 1.08 KB
/
vite.config.mts
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
/* eslint-disable no-console */
import { fileURLToPath } from 'node:url'
import vue from '@vitejs/plugin-vue'
import { defineConfig, loadEnv } from 'vite'
import viteTsconfigPaths from 'vite-tsconfig-paths'
import { resolve } from 'node:path'
const { VITE_APP_INFURA_PROJECT_KEY } = loadEnv('development', process.cwd())
console.log('VITE_APP_INFURA_PROJECT_KEY', VITE_APP_INFURA_PROJECT_KEY)
process.env.VITE_APP_INFURA_PROJECT_KEY = VITE_APP_INFURA_PROJECT_KEY
// TODO: code split and load controllers after login
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 4050
},
build: {
sourcemap: false
// sourcemap: true
},
define: {
__SENTRY_DEBUG__: false,
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.VITE_APP_INFURA_PROJECT_KEY': JSON.stringify(VITE_APP_INFURA_PROJECT_KEY)
},
plugins: [vue(), viteTsconfigPaths()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'bn.js': resolve('./node_modules/bn.js'),
lodash: resolve('./node_modules/lodash-es')
}
}
})