log assets size pretty after webpack build(wirte by typescript)
π Homepage
β¨ Example
https://github.com/jsany/log-filesize-example/blob/main/webpack.config.js#L168
- node >=10
- webpack >=4
yarn add -D @jsany/log-filesize-webpack-plugin
# or npm install --save-dev @jsany/log-filesize-webpack-plugin
const LogFilesizeWebpackPlugin = require('@jsany/log-filesize-webpack-plugin');
module.exports = {
stats: 'none', // to close webpack print
// ...
plugins: [
new LogFilesizeWebpackPlugin()
// or
// new LogFilesizeWebpackPlugin({gzip: true,...OtherOptions})
]
// ...
};
Options | Type | Default | Description |
---|---|---|---|
gzip |
boolean | true |
Print gzipped filesize |
errors |
boolean | true |
Print compile errors |
warnings |
boolean | true |
Print compile warnings |
hash |
boolean | true |
Print current compile hash |
version |
boolean | true |
Print current webpack version |
time |
boolean | true |
Print compile cost time |
builtAt |
boolean | true |
Print when to start compiling |
maxSize |
number | 1.8 * 1024 * 1024 (Byte) |
These sizes are pretty large. We'll warn for bundles exceeding them |
priority |
{ js?: number, css?: number,image?: number,font?: number,json?: number,txt?: number,html?: number} | { js: 10, css: 9,image: 8,font: 7,json: 6,txt: 5,html: 4} |
The larger the value, the higher the sort, and hide if less than zero |
- Support javascript and switch log it
- Support css and switch log it
- Support image and switch log it
- Support json and switch log it
- Support font and switch log it
- Support txt and switch log it
- Support html and switch log it
- Support custom assets log priority
- Support custom file color
- ...
Support files with these extensions: ext look detail
π€ jiangzhiguo2010
- Website: https://github.com/Mr-jiangzhiguo/book
- Github: @jsany
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a βοΈ if this project helped you!
Copyright Β© 2020 jiangzhiguo2010.
This project is MIT licensed.
This README was generated with β€οΈ by readme-md-generator