Skip to content

Commit

Permalink
Added ESBuild minification in configuration minify=true, it can be ad…
Browse files Browse the repository at this point in the history
…ded to specific environments or inherited from top-level and flags --minify which will minify script for publish and remote Dev.

Benefits:
- The script minification will allow for more code to the edge while not reaching the 1MB limit.
- Obfuscation of code in script.
resolves #785
  • Loading branch information
JacobMGEvans committed Apr 16, 2022
1 parent 6f99186 commit b832338
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/wrangler/src/config/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ interface EnvironmentInheritable {
* Minify the script before uploading.
* @inheritable
*/
minify: boolean | undefined;
minify?: boolean | undefined;

/**
* TODO: remove this as it has been deprecated.
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/dev/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type DevProps = {
compatibilityDate: string;
compatibilityFlags: undefined | string[];
usageModel: undefined | "bundled" | "unbound";
minify?: boolean;
minify?: boolean | undefined;
build: {
command?: undefined | string;
cwd?: undefined | string;
Expand Down

0 comments on commit b832338

Please sign in to comment.