JS-DevTools / npm-publish

GitHub Action to publish to NPM
https://jstools.dev/npm-publish
MIT License
620 stars 74 forks source link

perf(action): decrease bundle size #166

Closed mcous closed 1 year ago

mcous commented 1 year ago

Target imports more specifically to reduce action bundle size

Before:

[dist]
[dist] > @jsdevtools/npm-publish@3.0.1 build:dist
[dist] > esbuild src/action/main.ts --bundle --sourcemap --outdir=dist --platform=node --target=node16
[dist]
[dist]
[dist]   dist/main.js      376.3kb
[dist]   dist/main.js.map  587.1kb

After:

[dist]
[dist] > @jsdevtools/npm-publish@3.0.1 build:dist
[dist] > esbuild src/action/main.ts --bundle --sourcemap --outdir=dist --platform=node --target=node16
[dist]
[dist]
[dist]   dist/main.js      241.7kb
[dist]   dist/main.js.map  349.9kb