This commit is contained in:
2025-12-13 14:46:06 +08:00
parent 7f1d827a69
commit 683d75e6ec

29
vite.config.elderly.ts Normal file
View File

@@ -0,0 +1,29 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
base: './',
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
define: {
'import.meta.env.VITE_XMOV_APP_ID': JSON.stringify(process.env.XMOV_APP_ID || ''),
'import.meta.env.VITE_XMOV_APP_SECRET': JSON.stringify(process.env.XMOV_APP_SECRET || ''),
},
build: {
outDir: 'dist/elderly',
rollupOptions: {
input: {
main: path.resolve(__dirname, 'elderly.html'),
},
},
},
server: {
port: 3000,
open: '/elderly.html',
},
})