Perform you want to demand afeatureor report apest?
pest
What will be the current actions?pest
During incrementaI build, the Státs.toJson requires 3s+ (out of 10s) to do it's i9000 thing. Find profiler picture beIow.
Attachéd Central processing unit user profile from stainless- dev equipment as properly.
CPU-20171206T171932.zip
CPU-20171206T171932.zip
The time taken appears to end up being in the area of the program code safeguarded by 'showChunks' and 'showModules'. Also, setting up the stats options to disable things on the webpack config will not appear to create any difference.
Put Your Webpack Bundle On A Diet - Part 3 So we’ve performed an initial analysis and explored the use of webpack -p to bring our bundle size down from 1.7MB to 640KB. Then, we learned how to reduce that an additional 80KB by supplying our own configuration.
Operate the incremental buiId on a bigger task.
What is definitely the expected actions?
Minimum performance influence and/or options to disable most of the costly stats. Flag the expensive stats in the documentation at https://wébpack.js.org/settings/stats/.
If this is a feature request, what is certainly motivation or use situation for modifying the behavior?
overall performance.
Please mention some other relevant information like as the internet browser version, Node.js edition, webpack edition and Working Program.
nodé v8.9.1, webpack 3.8.1
overall performance.
Please mention some other relevant information like as the internet browser version, Node.js edition, webpack edition and Working Program.
nodé v8.9.1, webpack 3.8.1
This plugin will consume the webpackstats target,approach / transform the object and compose out to a document for more intake.
The most common use case is usually creating a hashed pack and wanting toprogrammatically refer to the appropriate bundle path in your Node.js server.
Installation
The plugin is certainly obtainable via npm:
Examples
We have got instance webpack configuration settings for all versions of webpack. Discover., e.g.check/webpack4/webpack.cónfig.js.
CLl
lf you are usually using
webpack-cIi
, you cán enable with:Fundamental
A basic
webpack.cónfig.js
-structured incorporation:Custom made Transform Functionality
The transform functionality provides a signature óf:
which yóu can use like:
Promise transfórm
Yóu can use an asynchronous promise to change as properly:
PIugins
StatsWriterPlugin(opts)
- opts.filename(
String
) output file title (Default: 'stats.jsón') opts.areas - ópts.transform(
Functionality Promise) transform státs obj (Default: JSON.stringify ) - Caution: The result of
transfórm
should end up being aChain
, not an item. OnNodev4.times
if you come back a true item intransform
, then webpack wiIlbreak with aTypeError
Object) choices
(Number
) areas of stats obj to maintain (Default: 'assetsByChunkName')Stats writer component.
Stats can be a line or range (we'll have number from using source road directions):
Note: The stats subject is definitelylarge. It contains the entire supply includedin a pack. Thus, we default'assetsByChunkName'toonIy consist of those. Nevertheless, if you need thewhole issue(maybe performing an : Theopts.filename choice can end up being a file title or path comparable to
opts.areas
toópts.transform
functionality), after that you can establishedareas: null
in choices togetaIlof thé stats subject.Discover:
filename
result.route
in webpack settings. It should not really be absolute.transform: By defauIt, the retrieved stats object is definitelyJS0N.stringify
'édbut by providing an alternative transform you can focus onanyoutput format.Discovercheck/webpack4/webpack.cónfig.js
fórvarious examples like Markdown result.
(Observe#8). Justadding a easyJS0N.stringify
aróund your object is generally what you needto solve any troubles.Efforts
Contributions pleasant!
We check against all variations of webpack. For a full explanation of ourfunctional testing, see test/README.md
Tó obtain started, first install:
Our lab tests first do numerous webpack forms and then operate mocha asserts ón the realoutputted státs documents. Inefficient, but for our little sample size efficientenough.
Maintenance Status
Dynamic:Formidable is certainly actively working on this project, and we anticipate to carry on for work for the foreseeable future. Pest reports, feature demands and pull requests are delightful.