webpack-sort-chunks

0.2.0 • Public • Published

webpack-sort-chunks

Generated with nod NPM version Build Status Coverage Status

Sorts webpack chunks by dependency

The source code here is vendored from html-webpack-plugin/lib/chunksorter.js

Install

$ npm install --save webpack-sort-chunks

Usage

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

Returns Array<Chunk>

License

MIT © Diego Haz

Package Sidebar

Install

npm i webpack-sort-chunks

Weekly Downloads

158

Version

0.2.0

License

MIT

Unpacked Size

7.48 kB

Total Files

5

Last publish

Collaborators

  • diegohaz