mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
39 lines
981 B
TypeScript
39 lines
981 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
// When DISABLE_ADDITIONAL_FEATURES is false (or unset), enable proprietary features
|
|
const isProprietary = process.env.DISABLE_ADDITIONAL_FEATURES !== 'true';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
tsconfigPaths({
|
|
projects: [
|
|
isProprietary ? './tsconfig.proprietary.json' : './tsconfig.core.json',
|
|
],
|
|
}),
|
|
],
|
|
server: {
|
|
host: true,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/oauth2': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/login/oauth2': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
},
|
|
},
|
|
base: process.env.RUN_SUBPATH ? `/${process.env.RUN_SUBPATH}` : './',
|
|
});
|