A Vite plugin that automatically splits vendor chunks (node_modules imports) into separate files for improved caching and parallel loading. Current stable version: 7.0.0. The plugin groups node_modules imports into vendor chunks based on package name, with scoped packages handled separately. It is a lightweight alternative to manual Rollup/Vite manualChunks configuration. Release cadence is irregular but maintained.
npm install split-vendor-chunk-pluginVerified import paths — ran on the pinned version, not inferred.
Basic Vite configuration using split-vendor-chunk-plugin to automatically split vendor chunks.
Avoid setting manualChunks when using this plugin, or customize manually via manualChunks instead of using this plugin.
Use a custom chunk name function or replace '@' in filenames if deployment fails.
Replace with Vite's manualChunks: `build: { rollupOptions: { output: { manualChunks(id) { if (id.includes('node_modules')) return 'vendor' } } } }`Use ESM import: `import splitVendorChunkPlugin from 'split-vendor-chunk-plugin'` and call it: `plugins: [splitVendorChunkPlugin()]`
Include `splitVendorChunkPlugin()` only once.
Disable source maps or configure clean chunk names: e.g., replace '@' with '_' in manualChunks.
No dependency data recorded yet.