23
loading...
This website collects cookies to deliver better user experience
package.json
:"build": "esbuild src/index.ts --bundle --outfile=dist/main.js"
$ npm install --save-dev esbuild
$ time npm run build
> [email protected] build
> esbuild src/index.ts --bundle --outfile=dist/main.js
dist/main.js 1.7mb ⚠️
⚡ Done in 166ms
real 0m0,416s
user 0m0,606s
sys 0m0,070s
0.4s
- real time as returned form time
command - the clock difference between starting a command & finishing it. It's slightly longer then what was returned by esbuild
, as it's system command, we can assume it similarly skewed for both esbuild & webpack.1.7mb
- dist/main.js size--minify
flag to the build script, we get as follow:0.4s
- build time773.9kb
- dist/main.js sizemode: "development" - minimization off:
sh
$ time npm run build
...
asset main.js 3.22 MiB [emitted] (name: main)
...
real 0m4,088s
user 0m7,025s
sys 0m0,251s
`
about ten times a long as esbuild & almost twice as big as non-minified esbuild run$ time npm run build
...
asset main.js 811 KiB [emitted] [minimized] [big] (name: main) 1 related asset
...
real 0m15,648s
user 0m25,688s
sys 0m0,530s