30 lines
544 B
TypeScript
30 lines
544 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
define: {
|
|
'import.meta.env': 'import.meta.env',
|
|
},
|
|
server: {
|
|
port: 3001,
|
|
host: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
sourcemap: false,
|
|
},
|
|
}) |