Webpack plugin to split an entry bundle into multiple smaller bundles based on absolute file paths. v2.0.1 is the latest stable version, compatible with webpack 2. v1.0.0 supports webpack 1. This plugin was largely superseded by webpack's built-in splitChunks in webpack 4+. It is based on split-by-name-webpack-plugin but uses absolute paths instead of module names. Useful for vendor bundle extraction in legacy webpack 1/2 projects.
npm install webpack-split-by-pathVerified import paths — ran on the pinned version, not inferred.
Shows a minimal webpack configuration using SplitByPathPlugin to separate node_modules into a vendor chunk and a components chunk from the app entry.
Use optimization.splitChunks in webpack.config.js instead.
Use path.resolve with __dirname to define absolute paths relative to project root.
Use path.join(__dirname, 'relative/path') for ignore paths.
Place more specific paths before broader paths in the chunks array.
Consider migrating to webpack 4+ splitChunks.
Run 'npm install webpack-split-by-path' and ensure it's in package.json dependencies.
Use 'const SplitByPathPlugin = require("webpack-split-by-path")' instead of destructuring.Run webpack from the project directory with local installation, or use npx webpack.
Ensure chunks are an array of { name: string, path: string } objects with absolute paths.Use 'ignoreChunks' as a string or array of chunk names to ignore.
No dependency data recorded yet.