Use @vercel/ncc
to compile Azure/login
#428
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since
@vercel/ncc
is recommended in the GitHub official documentation (also see the usage in Azure/cli) for compiling code and modules into a single file for distribution, we plan to utilize this tool to minimize the package size and setup time for Azure/login.The package size is reduced from
88MB
to550KB
.The setup time is reduced from avg
4s
(may be longer on self-hosted runner, see #103) to less than1s
.Test workflow: https://github.com/Azure/azclitools-actions-test/blob/main/.github/workflows/azure-login-test-setupTime.yml
Ubuntu-latest: 3s -> 1s
Windows-latest: 4s-> 1s
MacOs-latest: 7s -> 1s
Self-linux: 3s -> 1s
Self-windows: 108s -> 2s
Thanks @kWozniak-tt, for bringing this to our attention and for your valuable contribution in #367 to this topic!
Close #366