1.2.13 ā€¢ Published 4 years ago

@jsany/log-filesize-webpack-plugin v1.2.13

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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

Prerequisites

  • node >=10
  • webpack >=4

Install

yarn add -D @jsany/log-filesize-webpack-plugin
# or npm install --save-dev @jsany/log-filesize-webpack-plugin

Setup

In webpack.config.js:

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})
  ]
  // ...
};

Then run build, it will look like this:

example

Options

OptionsTypeDefaultDescription
gzipbooleantruePrint gzipped filesize
errorsbooleantruePrint compile errors
warningsbooleantruePrint compile warnings
hashbooleantruePrint current compile hash
versionbooleantruePrint current webpack version
timebooleantruePrint compile cost time
builtAtbooleantruePrint when to start compiling
maxSizenumber1.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

Feature

  • 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

Todo

  • Support custom file color
  • ...

Support files with these extensions: ext look detail

Author

šŸ‘¤ jiangzhiguo2010

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2020 jiangzhiguo2010. This project is MIT licensed.


This README was generated with ā¤ļø by readme-md-generator

1.2.13

4 years ago

1.2.12

4 years ago

1.2.11

4 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.0

4 years ago