mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-11 00:33:40 +00:00
chore: add ClickHouse package manual chunk in Vite configuration
This commit is contained in:
parent
1c1b63298f
commit
4455aeec2d
1 changed files with 10 additions and 4 deletions
|
|
@ -8,15 +8,18 @@ import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
|||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
const backendPort = process.env.BACKEND_PORT && Number(process.env.BACKEND_PORT) || 3080;
|
||||
const backendURL = process.env.HOST ? `http://${process.env.HOST}:${backendPort}` : `http://localhost:${backendPort}`;
|
||||
const backendPort = (process.env.BACKEND_PORT && Number(process.env.BACKEND_PORT)) || 3080;
|
||||
const backendURL = process.env.HOST
|
||||
? `http://${process.env.HOST}:${backendPort}`
|
||||
: `http://localhost:${backendPort}`;
|
||||
|
||||
export default defineConfig(({ command }) => ({
|
||||
base: '',
|
||||
server: {
|
||||
allowedHosts: process.env.VITE_ALLOWED_HOSTS && process.env.VITE_ALLOWED_HOSTS.split(',') || [],
|
||||
allowedHosts:
|
||||
(process.env.VITE_ALLOWED_HOSTS && process.env.VITE_ALLOWED_HOSTS.split(',')) || [],
|
||||
host: process.env.HOST || 'localhost',
|
||||
port: process.env.PORT && Number(process.env.PORT) || 3090,
|
||||
port: (process.env.PORT && Number(process.env.PORT)) || 3090,
|
||||
strictPort: false,
|
||||
proxy: {
|
||||
'/api': {
|
||||
|
|
@ -127,6 +130,9 @@ export default defineConfig(({ command }) => ({
|
|||
if (normalizedId.includes('@codesandbox/sandpack')) {
|
||||
return 'sandpack';
|
||||
}
|
||||
if (normalizedId.includes('@clickhouse') || normalizedId.includes('clickhouse')) {
|
||||
return 'clickhouse';
|
||||
}
|
||||
if (normalizedId.includes('react-virtualized')) {
|
||||
return 'virtualization';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue