Calculate the total size of a HTML bundle's assets.
- does not include transitive dependencies, e.g. dynamic imports, images in stylesheets
- images are not handled
Required Path to HTML file
Optional Base URL for assets referenced with relative URLs
Total bundle size of assets in bundle in bytes.
- uses: smartlyio/html-bundle-size-action@main
id: bundle
with:
path: ./bundle.html
base: https://cdn.example
- run: |
echo "Bundle size: $BUNDLE_SIZE"
env:
BUNDLE_SIZE: ${{ steps.bundle.outputs.size }}
npm run all