Skip to content

Commit a4b4640

Browse files
committed
perf: add size-limit
1 parent e6739da commit a4b4640

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/size.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: size
2+
on: [pull_request]
3+
jobs:
4+
size:
5+
runs-on: ubuntu-latest
6+
env:
7+
CI_JOB_NUMBER: 1
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: andresz1/size-limit-action@v1
11+
with:
12+
github_token: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@
1818
"publishConfig": {
1919
"access": "public"
2020
},
21+
"size-limit": [
22+
{
23+
"path": "dist/index.js",
24+
"limit": "264 B"
25+
},
26+
{
27+
"path": "dist/index.esm.js",
28+
"limit": "288 B"
29+
},
30+
{
31+
"path": "dist/index.umd.js",
32+
"limit": "270 B"
33+
}
34+
],
2135
"scripts": {
2236
"clean": "rimraf dist",
2337
"prebuild": "npm run clean",

0 commit comments

Comments
 (0)