mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-10-20 17:13:44 +00:00
🧩 chore: Prebundle Node Polyfills for Buffer, Process, and Global in Vite optimizeDeps (#14354)
Enhance the Vite configuration by including specific node polyfills in the `optimizeDeps` section. This change ensures that the necessary polyfills for `buffer`, `process`, and `global` are optimized for better performance during development. This adjustment aims to improve compatibility and streamline the build process.
This commit is contained in:
parent
d02867a3e2
commit
1a58c72444
1 changed files with 7 additions and 0 deletions
|
|
@ -177,6 +177,13 @@ export default defineConfig(({ command }) => ({
|
|||
threshold: 10240,
|
||||
}),
|
||||
],
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'vite-plugin-node-polyfills/shims/buffer',
|
||||
'vite-plugin-node-polyfills/shims/process',
|
||||
'vite-plugin-node-polyfills/shims/global',
|
||||
],
|
||||
},
|
||||
publicDir: command === 'serve' ? './public' : false,
|
||||
build: {
|
||||
sourcemap: buildSourceMap,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue