-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn for scripts larger than 1MB compressed (#2130)
* Warn for scripts larger than 1MB compressed Prints a warning for scripts > 1MB compressed, encouraging smaller script sizes. If a publish fails with either a script size error or a validator error on script startup (CPU or memory), we print out the largest 5 dependencies in your bundle. This is accomplished by using the esbuild generated metafile. * Add NO_SCRIPT_SIZE_WARNING env variable Will skip the warning about bundle sizes when your bundle exceeds 1MB gzipped if set * Add changeset Co-authored-by: Matthew Rodgers <matthewrodgers@cloudflare.com>
- Loading branch information
1 parent
1987a79
commit 68f4fa6
Showing
7 changed files
with
335 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"wrangler": minor | ||
--- | ||
|
||
feature: Add warnings around bundle sizes for large scripts | ||
|
||
Prints a warning for scripts > 1MB compressed, encouraging smaller | ||
script sizes. This warning can be silenced by setting the | ||
NO_SCRIPT_SIZE_WARNING env variable | ||
|
||
If a publish fails with either a script size error or a validator error | ||
on script startup (CPU or memory), we print out the largest 5 | ||
dependencies in your bundle. This is accomplished by using the esbuild | ||
generated metafile. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.