Install any skill in seconds. Free to start, no credit card required.
Get Started Free →webiny/api-bundle-size-limit
Covers how to configure the maximum allowed size of the Webiny API Lambda bundle using the Infra.Api.MaxBundleSize extension in webiny.config.tsx.
Passed 24 of 24 test cases with the skill, and 9 of 24 without it.
and 15 more in the full report
15 fixed9 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 15 test cases the skill fixed. Same model, same prompt, with and without the skill.
Which Webiny build tool package reads the environment variable set by the API bundle size extension when executing the build?
| Checked | Without skill | With skill |
|---|---|---|
| Identifies @webiny/build-tools as the bundler package. | Missed | Passed |
The instructions your model reads when the skill loads.
The Infra.Api.MaxBundleSize extension enforces a maximum size on the built API Lambda bundle. The default limit is 4.5 MB. If the bundle exceeds the limit the build fails with a clear error; add the extension to webiny.config.tsx to raise (or lower) it.
By default Webiny enforces a 4.5 MB limit on the API Lambda bundle (handler.mjs). If the built output exceeds this, the build fails:
error Build errors:
× asset size limit: The following asset(s) exceed the recommended size limit (4.5 MiB).
× entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (4.5 MiB).
error build failed
Add Infra.Api.MaxBundleSize to webiny.config.tsx with size in bytes:
// webiny.config.tsx
import { Infra } from "webiny/extensions";
export const Extensions = () => (
<>
{/* Raise the API bundle size limit to 6 MB */}
<Infra.Api.MaxBundleSize size={6 * 1024 * 1024} />
</>
);
Common byte values:
| MB | Bytes expression | Exact bytes |
|---|---|---|
| 4.5 | Math.round(4.5 * 1024 * 1024) | 4718592 (default) |
| 5 | 5 * 1024 * 1024 | 5242880 |
| 6 | 6 * 1024 * 1024 | 6291456 |
test cases passed, vs 9 / 24 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.