Sign inSign up

alekzonder/webpack1-size-checker

By alekzonder

Updated over 9 years ago

check webpack bundle size for npm module

Image
0

385

alekzonder/webpack1-size-checker repository overview

webpack1-size-checker

install

docker pull alekzonder/webpack1-size-checker:latest

usage as service

docker run --detach=true -v /var/run/docker.sock:/var/run/docker.sock -p 9001:9001 --name webpack1-size-checker -t alekzonder/webpack1-size-checker

curl -XPOST "http://localhost:9001/check?package=lodash&require=lodash/get"

# OR download bash script to /usr/local/bin

wget -O /usr/local/bin/wp_size "https://raw.githubusercontent.com/alekzonder/webpack1-size-checker/master/wp_size.sh" && chmod +x /usr/local/bin/wp_size

# set WEBPACK_SIZE_CHECKER_HOST env var in your ~/.bashrc
# OR set before run

WEBPACK_SIZE_CHECKER_HOST=localhost:9001 wp_size lodash lodash/get

usage image for checking


docker run --rm -t alekzonder/webpack1-size-checker /app/start.sh superagent

# OR with version
docker run --rm -t alekzonder/webpack1-size-checker /app/start.sh [email protected]

# change require module string

docker run --rm -t alekzonder/webpack1-size-checker /app/start.sh lodash@4 lodash/get

output
installing superagent@*

npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info config set "progress" "false"
npm info ok
[email protected] /app
`-- [email protected]
 +-- [email protected]
 +-- [email protected]
 +-- [email protected]
 | `-- [email protected]
 +-- [email protected]
 +-- [email protected]
 | +-- [email protected]
 | +-- [email protected]
 | | `-- [email protected]
 | `-- [email protected]
 |   `-- [email protected]
 +-- [email protected]
 +-- [email protected]
 +-- [email protected]
 +-- [email protected]
 `-- [email protected]
   `-- [email protected]

Hash: 0084ca7543af3b8ca6b5
Version: webpack 1.14.0
Time: 192ms
        Asset     Size  Chunks             Chunk Names
app.bundle.js  42.8 kB    0, 1  [emitted]  app
init.bundle.js  3.55 kB       1  [emitted]  init
  [0] ./src/app.js 40 bytes {0} [built]
   + 7 hidden modules


=== bundle size ===

public/app
|-- [ 42K]  app.bundle.js
`-- [3.5K]  init.bundle.js

0 directories, 2 files

LICENSE

MIT

Tag summary

Content type

Image

Digest

Size

259.8 MB

Last updated

over 9 years ago

docker pull alekzonder/webpack1-size-checker