Initial Commit
This commit is contained in:
26
src/vite.config.ts
Normal file
26
src/vite.config.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import path from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
root: 'client', // Set root to client folder where index.html resides
|
||||
build: {
|
||||
outDir: '../dist', // Build to src/dist (outside client)
|
||||
emptyOutDir: true
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './client/src')
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': 'http://localhost:3000', // Proxy API requests to backend
|
||||
'/socket.io': {
|
||||
target: 'http://localhost:3000',
|
||||
ws: true
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user