🧩 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:
Danny Avila 2026-07-20 21:18:27 -04:00 • committed by GitHub
parent d02867a3e2
commit 1a58c72444
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,