Skip to content

Commit

Permalink
chore: size-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe committed Mar 15, 2024
1 parent 1d0fc6f commit 5aa8348
Show file tree
Hide file tree
Showing 3 changed files with 712 additions and 6 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 📦 Size Limit

on:
pull_request:
types: [opened, synchronize]

permissions:
contents: read

jobs:
size:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"package-diff": "antd-tools run package-diff --path=./lib",
"pub": "npm run package-diff && npm publish ./lib",
"pub:alpha": "npm publish ./lib --tag alpha",
"pub:dev": "npm publish ./lib --tag dev"
"pub:dev": "npm publish ./lib --tag dev",
"size-limit": "size-limit"
},
"dependencies": {
"@floating-ui/dom": "^1.4.2",
Expand Down Expand Up @@ -51,6 +52,7 @@
"@docsearch/react": "^3.3.3",
"@jest/types": "^28.1.3",
"@react-spring/core": "~9.6.1",
"@size-limit/preset-big-lib": "^11.1.0",
"@statoscope/webpack-plugin": "^5.26.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
Expand Down Expand Up @@ -116,6 +118,7 @@
"react-lottie": "^1.2.3",
"react-test-renderer": "^18.2.0",
"react-virtualized": "^9.22.5",
"size-limit": "^11.1.0",
"style-loader": "^3.3.2",
"through2": "^4.0.2",
"ts-jest": "^28.0.8",
Expand Down Expand Up @@ -158,5 +161,11 @@
"url": "git+https://github.com/ant-design/ant-design-mobile.git",
"branch": "master",
"platform": "github"
}
},
"size-limit": [
{
"path": "./lib/bundle/antd-mobile.es.js",
"limit": "200 kB"
}
]
}
Loading

0 comments on commit 5aa8348

Please sign in to comment.