Sorts webpack chunks by dependency
MIT License
Sorts webpack chunks by dependency
The source code here is vendored from html-webpack-plugin/lib/chunksorter.js
$ npm install --save webpack-sort-chunks
import sortChunks from 'webpack-sort-chunks'
const sortedChunks = sortChunks(stats.chunks)
// If you hold on to the Webpack compilation, pass it as the second argument
// It will be faster in Webpack >= v4
const sortedChunks = sortChunks(stats.chunks, compilation)
Type: {chunkGroups: {}}
chunkGroups
{}
chunks
Array<Chunk>
compilation
Compilation
Returns Array<Chunk>
MIT © Diego Haz