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
@@ -93,6 +95,34 @@ We are using [Statoscope] for this analysis.
93
95
94
96
## Usage
95
97
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
+
96
126
### JS Applications
97
127
98
128
Suitable for applications that have their own bundler and send the JS bundle
0 commit comments