Lightweight, Convenient, Fast command tool to control your file size, size-limit is too bloated.
npm install limit-size> Lightweight, Convenient, Fast command tool to control your file size, size-limit is too bloated.




``bash`
$ npm i --save-dev limit-size
- Add the limit-size section and the size script to your package.json:
`diff`
"scripts": {
+ "size": "limit-size",
"test": "jest"
},
+ "limit-size": [
+ {
+ "path": "dist/g2plot.min.js",
+ "limit": "500 Kb"
+ },
+ {
+ "path": "dist/g2plot.min.js",
+ "limit": "200 Kb",
+ "gzip": true
+ }
+ ],
- you can get the size for your current project:
`bash`
$ npm run size
`bashinstall dependence
$ npm install
MIT@hustcc.