-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
40 lines (36 loc) · 959 Bytes
/
vite.config.js
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
// Dependencies
import path from 'path'
// Configuration
import { defineConfig, loadEnv } from 'vite'
// Plugins
import vue from '@vitejs/plugin-vue'
import glsl from 'vite-plugin-glsl'
// Custom Configuration
export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }
return {
root: path.join(__dirname, 'src'),
build: {
outDir: path.join(__dirname, 'dist'),
},
server: {
port: process.env.VITE_SERVER_PORT || 3000,
},
// See: https://stackoverflow.com/a/71252262
define: {
__VUE_I18N_LEGACY_API__: false,
__VUE_I18N_FULL_INSTALL__: true,
__INTLIFY_PROD_DEVTOOLS__: false,
},
plugins: [vue(), glsl()],
resolve: {
alias: {
'@': path.join(__dirname, 'src'),
'@@': path.join(__dirname),
},
},
envDir: process.cwd(),
envPrefix: 'VUE_',
publicDir: path.resolve(__dirname, 'public'),
}
})