Created
November 17, 2019 17:29
-
-
Save DragorWW/c54f5c78fd4c1f2f56ed88c1f73ef4b0 to your computer and use it in GitHub Desktop.
Revisions
-
DragorWW created this gist
Nov 17, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ const fs = require('fs'); // run `webpack --profile --json > compilation-stats.json` before this script const stats = require('./compilation-stats'); fs.writeFileSync( 'import-top.tsv', stats.modules .map(i => { return { name: i.name, count: i.reasons.length, }; }) .map(i => `${i.name}\t${i.count}`) .join('\n') );