mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🔧 chore: Vite Plugin Upgrades & Config Optimizations (#6547)
* 🔧 fix: Update compression plugin to version 2 and adjust configuration * 🔧 fix: Adjust compression plugin configuration to set threshold to 10240 * 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and add external polyfills in configuration * 🔧 fix: Downgrade vite-plugin-node-polyfills to version 0.17.0 and remove external polyfills from configuration * 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and remove outdated version from package.json * 🔧 fix: Update vite-plugin-node-polyfills to version 0.23.0 and remove outdated version from package.json * chore: fix vite-plugin-node-polyfills workspace installation --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
64f4e376a8
commit
8716d44d28
4 changed files with 499 additions and 1268 deletions
|
|
@ -122,7 +122,7 @@
|
||||||
"@types/node": "^20.3.0",
|
"@types/node": "^20.3.0",
|
||||||
"@types/react": "^18.2.11",
|
"@types/react": "^18.2.11",
|
||||||
"@types/react-dom": "^18.2.4",
|
"@types/react-dom": "^18.2.4",
|
||||||
"@vitejs/plugin-react": "^4.2.1",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
|
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
|
||||||
"babel-plugin-root-import": "^6.6.0",
|
"babel-plugin-root-import": "^6.6.0",
|
||||||
|
|
@ -142,8 +142,8 @@
|
||||||
"ts-jest": "^29.2.5",
|
"ts-jest": "^29.2.5",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"vite": "^6.2.3",
|
"vite": "^6.2.3",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression2": "^1.3.3",
|
||||||
"vite-plugin-node-polyfills": "^0.17.0",
|
"vite-plugin-node-polyfills": "^0.23.0",
|
||||||
"vite-plugin-pwa": "^0.21.1"
|
"vite-plugin-pwa": "^0.21.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
import { VitePWA } from 'vite-plugin-pwa';
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||||
import compression from 'vite-plugin-compression';
|
import { compression } from 'vite-plugin-compression2';
|
||||||
import type { Plugin } from 'vite';
|
import type { Plugin } from 'vite';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
|
|
@ -82,11 +82,7 @@ export default defineConfig({
|
||||||
}),
|
}),
|
||||||
sourcemapExclude({ excludeNodeModules: true }),
|
sourcemapExclude({ excludeNodeModules: true }),
|
||||||
compression({
|
compression({
|
||||||
verbose: true,
|
threshold: 10240,
|
||||||
disable: false,
|
|
||||||
threshold: 10240, // compress files larger than 10KB
|
|
||||||
algorithm: 'gzip',
|
|
||||||
ext: '.gz',
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
publicDir: './public',
|
publicDir: './public',
|
||||||
|
|
@ -144,7 +140,7 @@ export default defineConfig({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Ignore "use client" waning since we are not using SSR
|
* Ignore "use client" warning since we are not using SSR
|
||||||
* @see {@link https://github.com/TanStack/query/pull/5161#issuecomment-1477389761 Preserve 'use client' directives TanStack/query#5161}
|
* @see {@link https://github.com/TanStack/query/pull/5161#issuecomment-1477389761 Preserve 'use client' directives TanStack/query#5161}
|
||||||
*/
|
*/
|
||||||
onwarn(warning, warn) {
|
onwarn(warning, warn) {
|
||||||
|
|
|
||||||
1745
package-lock.json
generated
1745
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -91,6 +91,7 @@
|
||||||
"@playwright/test": "^1.50.1",
|
"@playwright/test": "^1.50.1",
|
||||||
"@types/react-virtualized": "^9.22.0",
|
"@types/react-virtualized": "^9.22.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
"elliptic": "^6.6.1",
|
||||||
"eslint": "^9.20.1",
|
"eslint": "^9.20.1",
|
||||||
"eslint-config-prettier": "^10.0.1",
|
"eslint-config-prettier": "^10.0.1",
|
||||||
"eslint-import-resolver-typescript": "^3.7.0",
|
"eslint-import-resolver-typescript": "^3.7.0",
|
||||||
|
|
@ -110,8 +111,7 @@
|
||||||
"prettier": "^3.5.0",
|
"prettier": "^3.5.0",
|
||||||
"prettier-eslint": "^16.3.0",
|
"prettier-eslint": "^16.3.0",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
"typescript-eslint": "^8.24.0",
|
"typescript-eslint": "^8.24.0"
|
||||||
"elliptic": "^6.6.1"
|
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"axios": "1.8.2",
|
"axios": "1.8.2",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue