init
This commit is contained in:
42
mc_test/vite.config.ts
Executable file
42
mc_test/vite.config.ts
Executable file
@ -0,0 +1,42 @@
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import path from 'path'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode }) => {
|
||||
// Load env file based on mode
|
||||
const env = loadEnv(mode, process.cwd(), '')
|
||||
|
||||
return {
|
||||
plugins: [react()],
|
||||
base: './',
|
||||
|
||||
server: {
|
||||
host: env.VITE_DEV_HOST || '192.168.200.10',
|
||||
allowedHosts: [env.VITE_DEV_ALLOWED_HOST || 'test.exbytestudios.com'],
|
||||
port: parseInt(env.VITE_DEV_PORT || '5173'),
|
||||
strictPort: true,
|
||||
// HMR via public domain (for dev mode through nginx proxy)
|
||||
hmr: {
|
||||
protocol: 'wss',
|
||||
host: env.VITE_DEV_ALLOWED_HOST || 'test.exbytestudios.com',
|
||||
clientPort: 443,
|
||||
},
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: 'dist/renderer',
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: path.resolve(__dirname, 'index.html'),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user