[webpack-plugin]
collect compressed (e.g. gzip) size of the resources (assets and modules)
There is a new compressor
- option that can be false | 'gzip' | ['gzip', ZlibOptions] | CompressFunction
:
'gzip'
(default) - compress all the resources with gzip (compression level - 6) and collect the compressed sizes
['gzip', ZlibOptions]
- the same as gzip
but with custom zlib settings
CompressFunction
- a function that takes source as an input and should return compressed size for this resource (useful if you want to use a non-gzip compressor)
false
- don't collect compressed sizes
It uses webpack-stats-extension-compressed
under the hood
[webpack-plugin]
collect packages versions
It uses webpack-stats-extension-package-info
under the hood
[webpack-ui]
taking compressed (e.g. gzip) size of the resources into account
There is a new setting to taking resources compressed size into account.
If enabled then all the sizes will be shown as compressed.
New jora-helpers:
getModuleSize(module, hash)
return compressed or normal module size
getAssetSize(asset, hash)
return compressed or normal asset size
It uses stats-extension-compressed
under the hood and works only when the stats-file was taken from webpack-plugin@>=5.3
or any source that uses stats-extension-compressed
[webpack-ui]
taking packages versions into account and output these in all the package items
Also, added instance version into compilations.nodeModules.instance
It uses stats-extension-package-info
under the hood and works only when the stats-file was taken from webpack-plugin@>=5.3
or any source that uses stats-extension-package-info
[webpack-ui]
download time measure
There are two new settings to select network speed and assets inject type. A download time for assets/chunks/entrypoints will be calculated based on specified network speed and assets inject type.
There are two assets inject types:
sync
: download time = sum(downloadTime(assets))
Download time is a sum of the download time of all the assets
async
: download time = max(downloadTime(assets))
Download time is a download time of most heavy asset (usefull if async
/defer
used to inject your assets)
The default network type is 3G Fast (1.37 MBit/s)
(like in Chromium).
Assets inject type is sync
by default.
[webpack-ui]
add compact
-property to asset/chunk/module/entry-item
-widget
This property removes all the badges from the entity item
[webpack-ui]
add Entrypoints
tab on diff
-page
Honestly, I just forgot to enable this tab a few releases ago 🙈
[stats-extension-compressed]
extension for collecting compressed resource sizes
It allows compressing specified resource content (string
or Buffer
) with gzip
or any other compressor.
Also, it contains the API to generate and extract this info.
[webpack-stats-extension-compressed]
webpack adapter for stats-extension-compressed
It allows collecting compressed resource sizes from webpack compilation
[stats-extension-package-info]
extension for collecting packages versions
It allows compressing specified resource content (string
or Buffer
) with gzip
or any other compressor.
Also, it contains the API to generate and extract this info.
[webpack-stats-extension-package-info]
webpack adapter for stats-extension-package-info
It allows collecting package versions from webpack compilation
[webpack-model]
added resolveExtension(name)
jora-helper that returns extension API
[webpack-model]
support stats-extension-package-info
extension
There is a new jora-helpers:
getPackageInstanceInfo(package, instancePath, hash)
that returns a package instance information
[webpack-model]
support stats-extension-compressed
extension
There are new jora-helpers:
getModuleSize(module, compressed?, hash?)
returns compressed or normal module size
getAssetSize(asset, compressed?, hash?)
returns compressed or normal asset size
[webpack-model]
added jora-helpers to getting network type and download speed:
getNetworkTypeInfo(networkType: string)
return full info about specified network by its name (full list of type you can find at network-type-list.ts)
getNetworkTypeName(networkType: Item)
return full name for specified network
getDownloadTime(size: number, networkType: string)
calculate download time based on selected network type
[helpers]
add locale
-parameter to formatDate
-helper
[cli]
(validate): use info
-type for messages by default
[stats]
a new package that contains Statoscope own stats format (extension-entity for now, but there are will be more entities)
[extensions]
a new package that contains Statoscope extensions toolkit
[report-writer]
add Piper - a proxy to ensure that all stream consumers have got a chunk
[plugin, ui]
Support stats with any size.
JS engines have a string size limit (e.g. 512mb for V8). It means that JSON with a size bigger than this limitation can't be parsed with JSON.parse
Now Statoscope uses a streaming JSON parsing (thanks to json-ext) to ignore this limitation.
[plugin-webpack]
Add saveStatsTo: string
option
You can save a webpack stats with saveStatsTo: '/abs/path/to/stats.json'
Use [name]
and [hash]
placeholders to replace these by compilation.name
and compilation.hash
[plugin-webpack]
Add additionalStats: string[]
option
You can load any stats to Statoscope to switch between them or diff these on the Diff page.
additionalStats: ['/abs/path/to/previous/stats.json']
[plugin-webpack]
Add statsOptions: Object
option
You can override your webpack-config stats
option by statsOptions
option
statsOptions: { all: true, source: false }
All stats-options see at docs
[plugin-webpack]
Add watchMode:boolean
option
By default, Statoscode does not generate a report if webpack run in watch-mode. Set watchMode: true
to generate a report in watch-mode
[plugin-webpack]
Add [name]
and [hash]
placeholders to staveTo
option to replace these by compilation.name
and compilation.hash
[Breaking]: Change data structure
Now, Statoscope normalize the stats to a specific standardized structure.
You can see it at Make report page.
Every stat has some basic info (filename, webpack version) and a list of the compilations.
The modules/chunks/assets are resolved now
Statoscope init-function argument also changed:
import init from '@statoscope/ui-webpack';
import stats from 'path/to/stats.json';
init({
name: 'stats.json',
data: stats,
});
Stats diff
Statoscope provides a tool to diff the stats.
Load two or more stats to diff it.
Support multiple stat files
Now you can load multiple stats and switch between them.
Support multi-config projects
If you have a multi-config project (e.g. client and server described in one config)
then it will be splitter into a few compilations with possibility to switching between them.
Rework main page dashboard
Add some indicators:
Total size
- size of all the assets of your bundle
Initial size
- size of all the initial assets of your bundle
Packages size
- size of all
Duplicate modules
- total modules with the same source
Build Time
Remove chunk groups indicator
Add duplicate module info
Now you can see all the modules with the same source
Add stats validation
- Add deopt block to a module page
- Add module issuer path
- improve filtration speed