The relative outDir '../src/main/resources/static' resolved unpredictably in Docker. Use standard 'dist/' output, then: - Dockerfile: COPY --from=frontend /ui/dist/ to static/ - CI: cp -r dist/ to src/main/resources/static/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
342 B
TypeScript
20 lines
342 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
},
|
|
});
|