mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Add size-limit
This commit is contained in:
parent
8618deec29
commit
7330370413
3 changed files with 1136 additions and 11 deletions
20
.github/workflows/size-limit.yml
vendored
Normal file
20
.github/workflows/size-limit.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: Size limit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- production
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
size:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_JOB_NUMBER: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: andresz1/size-limit-action@v1.8.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
1111
package-lock.json
generated
1111
package-lock.json
generated
File diff suppressed because it is too large
Load diff
16
package.json
16
package.json
|
@ -13,7 +13,8 @@
|
|||
"messages:extract:clean": "lingui extract --locale en --clean",
|
||||
"messages:compile": "lingui compile",
|
||||
"fetch-i18n-volunteers": "env $(cat .env.local | grep -v \"#\" | xargs) node scripts/fetch-i18n-volunteers.js",
|
||||
"readme:i18n-volunteers": "node scripts/update-i18n-volunteers-readme.js"
|
||||
"readme:i18n-volunteers": "node scripts/update-i18n-volunteers-readme.js",
|
||||
"size": "npm run build && size-limit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@formatjs/intl-localematcher": "~0.5.4",
|
||||
|
@ -61,6 +62,7 @@
|
|||
"@lingui/cli": "~4.11.4",
|
||||
"@lingui/vite-plugin": "~4.11.4",
|
||||
"@preact/preset-vite": "~2.9.0",
|
||||
"@size-limit/preset-app": "~11.1.5",
|
||||
"babel-plugin-macros": "~3.1.0",
|
||||
"postcss": "~8.4.45",
|
||||
"postcss-dark-theme-class": "~1.3.0",
|
||||
|
@ -95,5 +97,17 @@
|
|||
"browserslist": [
|
||||
"defaults",
|
||||
"android >= 4"
|
||||
],
|
||||
"size-limit": [
|
||||
{
|
||||
"path": [
|
||||
"dist/assets/*.js",
|
||||
"dist/assets/icons/*.js"
|
||||
],
|
||||
"limit": "500 kB",
|
||||
"running": false,
|
||||
"gzip": false,
|
||||
"brotli": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue