You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -95,34 +93,6 @@ We are using [Statoscope] for this analysis.
95
93
96
94
## Usage
97
95
98
-
### Quick Start with npx
99
-
100
-
Size Limit can be used with npx for quick size checks, but requires the appropriate plugin to be installed first due to its plugin architecture:
101
-
102
-
1. Install the required plugin as a **dev dependency** (choose based on your needs):
103
-
104
-
```sh
105
-
npm install --save-dev @size-limit/file # For simple file size checks
106
-
# Or for other cases:
107
-
# npm install --save-dev @size-limit/webpack # For webpack projects
108
-
# npm install --save-dev @size-limit/esbuild # For faster checks
109
-
```
110
-
111
-
2. Run size-limit with **npx**:
112
-
113
-
```sh
114
-
npx size-limit --limit "10 kB" dist/bundle.js
115
-
```
116
-
117
-
3. Run size-limit with **global** installation instead of npx:
118
-
119
-
```sh
120
-
npm install --global @size-limit/cli
121
-
size-limit --limit "10 kB" dist/bundle.js
122
-
```
123
-
124
-
Note: This approach works best for quick checks. For long-term project maintenance and CI integration, we recommend the full installation methods described below.
125
-
126
96
### JS Applications
127
97
128
98
Suitable for applications that have their own bundler and send the JS bundle
@@ -258,7 +228,7 @@ to track the time a browser takes to compile and execute your JS.
258
228
```
259
229
260
230
6. If you don’t have a continuous integration service running, don’t forget
261
-
to add one — start with Github Actions.
231
+
to add one — start with GitHub Actions.
262
232
263
233
</details>
264
234
@@ -342,7 +312,7 @@ the size in bytes. Libraries like [React] are good examples for this preset.
342
312
```
343
313
344
314
7. If you don’t have a continuous integration service running, don’t forget
345
-
to add one — start with Github Actions.
315
+
to add one — start with GitHub Actions.
346
316
8. Add the library size to docs, it will help users to choose your project:
347
317
348
318
```diff
@@ -429,7 +399,7 @@ for this preset.
429
399
```
430
400
431
401
7. If you don’t have a continuous integration service running, don’t forget
432
-
to add one — start with Github Actions.
402
+
to add one — start with GitHub Actions.
433
403
8. Add the library size to docs, it will help users to choose your project:
434
404
435
405
```diff
@@ -614,6 +584,13 @@ If you use Size Limit to track the size of CSS files, make sure to set
614
584
`webpack: false`. Otherwise, you will get wrong numbers, because webpack
615
585
inserts `style-loader` runtime (≈2 kB) into the bundle.
616
586
587
+
Also, you avoid having a config and pass the limit to CLI:
0 commit comments