Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Try splitting bundle size reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed May 3, 2022
1 parent 2fb7b51 commit 1ba13ab
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/bundle_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ concurrency:
cancel-in-progress: true

jobs:
build:
name: Check
modern:
name: Check modern bundle size
runs-on: ubuntu-latest

steps:
Expand All @@ -43,5 +43,22 @@ jobs:
- uses: preactjs/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
# Only measure changes in the client, we don't care much about the size of the server bundles (I don't think?)
pattern: "./.nuxt/dist/client/**/*.{modern.js,js,css}"
pattern: "./.nuxt/dist/client/**/*.modern.js"
clean-script: "build:clean"

universal:
name: Check univseral bundle size
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/setup-node-env

- name: Universal bundle size check
uses: preactjs/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
pattern: "./.nuxt/dist/client/**/*.js"
exclude: "{**/*.map,**/node_modules/**,**modern.js}"
clean-script: "build:clean"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"prebuild": "pnpm install && pnpm i18n",
"build": "pnpm build:only",
"build:only": "nuxt build",
"build:clean": "rm -rf .nuxt",
"generate": "nuxt generate",
"start": "nuxt start",
"prod": "pnpm build:only && pnpm start",
Expand Down

0 comments on commit 1ba13ab

Please sign in to comment.