Fix Vite build configuration for CI

- Set root to 'client' directory to find index.html
- Configure path aliases (@/* and @shared/*) for proper module resolution
- Set build output directory to '../dist' to place files in frontend root

Resolves CI build failure: 'Could not resolve entry module index.html'
This commit is contained in:
Damir Mukimov 2025-11-30 15:36:34 +01:00
parent 4ab2f3162a
commit ca75d868c6
No known key found for this signature in database
GPG Key ID: 42996CC7C73BC750

View File

@ -1,7 +1,18 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
root: 'client',
resolve: {
alias: {
'@': path.resolve(__dirname, './client/src'),
'@shared': path.resolve(__dirname, './shared')
}
},
build: {
outDir: '../dist'
}
})