Skip to content

Commit

Permalink
add size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
oshi97 committed Sep 8, 2023
1 parent bc80f7d commit dea4667
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ jobs:
- run: npm run build
- run: npm run build-test-site -w=apps/test-site
- run: npm run typecheck-jest
- run: npm run size-limit -w=packages/studio-ui
88 changes: 88 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/studio-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
stats.html
stats.html
7 changes: 7 additions & 0 deletions packages/studio-ui/.size-limit.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = [
{
path: "lib/src/index.js",
limit: "700 kB",
gzip: false,
},
];
7 changes: 5 additions & 2 deletions packages/studio-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
"scripts": {
"dev": "npm run copy-svg && tsc --watch --preserveWatchOutput -p tsconfig.json",
"copy-svg": "npx copyfiles \"src/**/*.svg\" lib",
"build": "rimraf lib && npm run copy-svg && tsc -p tsconfig.json",
"build": "vite build",
"test": "jest",
"typecheck-jest": "npx tsc -p tests/tsconfig.json"
"typecheck-jest": "npx tsc -p tests/tsconfig.json",
"size-limit": "size-limit"
},
"dependencies": {
"@dhmk/zustand-lens": "^2.0.5",
Expand Down Expand Up @@ -51,6 +52,7 @@
"@babel/plugin-syntax-flow": "^7.18.6",
"@babel/plugin-transform-react-jsx": "^7.19.0",
"@rollup/plugin-typescript": "^10.0.1",
"@size-limit/file": "^9.0.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
Expand All @@ -67,6 +69,7 @@
"jest-environment-jsdom": "^29.3.1",
"resize-observer-polyfill": "^1.5.1",
"rollup-plugin-visualizer": "^5.9.2",
"size-limit": "^9.0.0",
"vite-plugin-css-injected-by-js": "^3.3.0",
"vite-plugin-dts": "^3.5.3"
},
Expand Down

0 comments on commit dea4667

Please sign in to comment.