0.2.0 • Published 7 years ago
webpack-sort-chunks v0.2.0
webpack-sort-chunks
Sorts webpack chunks by dependency
The source code here is vendored from html-webpack-plugin/lib/chunksorter.js
Install
$ npm install --save webpack-sort-chunksUsage
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)API
Table of Contents
Compilation
Type: {chunkGroups: {}}
Properties
chunkGroups{}
sortChunks
Parameters
chunksArray<Chunk>compilationCompilation
Returns Array<Chunk>
License
MIT © Diego Haz