Skip to content

Commit

Permalink
Don't mangle constructor names with esbuild bundle (#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregBrimble authored Feb 21, 2023
1 parent 4ede044 commit 80f1187
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/new-news-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

fix: Ensure we don't mangle internal constructor names in the wrangler bundle when building with esbuild

Undici changed how they referenced `FormData`, which meant that when used in our bundle process, we were failing to upload `multipart/form-data` bodies. This affected `wrangler pages publish` and `wrangler publish`.
1 change: 1 addition & 0 deletions packages/wrangler/scripts/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ async function buildMain(flags: BuildFlags = {}) {
wranglerPackageDir
)}"`;
await build({
keepNames: true,
entryPoints: ["./src/cli.ts"],
bundle: true,
outdir,
Expand Down

0 comments on commit 80f1187

Please sign in to comment.