|
9 | 9 | "scripts": { |
10 | 10 | "prebuild": "rm -rf lib dist .cache", |
11 | 11 | "build": "npm-run-all build:pkg --parallel build:src:* --parallel build:pages:* build:themeable", |
| 12 | + "postbuild": "size-limit", |
12 | 13 | "lint": "eslint --ignore-path .gitignore --ext ts,tsx,js . && stylelint --ignore-path .gitignore '{src,pages}/**/*.{css,scss}'", |
13 | 14 | "prepare": "husky install", |
14 | 15 | "test:unit": "vitest run --config vite.unit.config.mjs", |
|
78 | 79 | "@cloudscape-design/global-styles": "^1.0.1", |
79 | 80 | "@cloudscape-design/test-utils-converter": "^1.0.0", |
80 | 81 | "@cloudscape-design/theming-build": "^1", |
| 82 | + "@size-limit/preset-small-lib": "^11.0.2", |
81 | 83 | "@testing-library/jest-dom": "^5.16.5", |
82 | 84 | "@testing-library/react": "^13.4.0", |
83 | 85 | "@types/jest-image-snapshot": "^6.1.0", |
|
112 | 114 | "react": "^18.2.0", |
113 | 115 | "react-dom": "^18.2.0", |
114 | 116 | "react-router-dom": "^6.6.1", |
| 117 | + "size-limit": "^11.0.2", |
115 | 118 | "stylelint": "^15.11.0", |
116 | 119 | "stylelint-config-recommended-scss": "^12.0.0", |
117 | 120 | "stylelint-order": "^6.0.3", |
|
136 | 139 | "package-lock.json": [ |
137 | 140 | "./scripts/prepare-package-lock.js" |
138 | 141 | ] |
139 | | - } |
| 142 | + }, |
| 143 | + "size-limit": [ |
| 144 | + { |
| 145 | + "path": "lib/components/index.js", |
| 146 | + "limit": "0.5kb" |
| 147 | + }, |
| 148 | + { |
| 149 | + "path": "lib/components/code-view/highlight/javascript.js", |
| 150 | + "limit": "1kb" |
| 151 | + } |
| 152 | + ] |
140 | 153 | } |
0 commit comments