Files
fredy/vite.config.js

44 lines
1.0 KiB
JavaScript
Raw Permalink Normal View History

2025-12-11 10:40:55 +01:00
/*
* Copyright (c) 2026 by Christian Kellner.
2025-12-11 10:40:55 +01:00
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
*/
2022-12-19 21:44:10 +01:00
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
// Must be absolute: with a relative base, asset URLs in index.html break on
// deep links like /listings/listing/:id (the SPA fallback serves index.html,
// but ./assets/* then resolves below the route path and loads HTML as JS).
base: '/',
2022-12-19 21:44:10 +01:00
build: {
chunkSizeWarningLimit: 9999999,
outDir: './ui/public',
emptyOutDir: true,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('node_modules/maplibre-gl')) {
return 'maplibre-gl';
}
},
},
},
},
optimizeDeps: {
include: ['maplibre-gl'],
2022-12-19 21:44:10 +01:00
},
plugins: [react()],
server: {
proxy: {
'/api': {
target: {
host: '0.0.0.0',
protocol: 'http:',
port: 9998,
},
},
},
},
});