Plan/react/dashboard/dashboard/vite.config.js
2024-01-07 10:10:35 +00:00

30 lines
748 B
JavaScript

import {defineConfig} from 'vite';
import react from '@vitejs/plugin-react';
import packageJson from './package.json'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react()
],
build: {
outDir: 'build',
assetsDir: 'static',
rollupOptions: {
treeshake: {
// Fixes an issue where backendConfiguration.staticSite if-blocks would get removed
correctVarValueBeforeDeclaration: true
}
}
},
server: {
host: 'localhost',
port: 3000,
open: true,
proxy: {
"/v1": {target: packageJson.proxy},
"/docs/swagger.json": {target: packageJson.proxy}
}
}
});