Skip to content

Commit

Permalink
Fix --experimental-local with wrangler pages dev (#2855)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregBrimble committed Mar 6, 2023
1 parent ad4b123 commit 226e63f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/shaggy-horses-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

fix: `--experimental-local` with `wrangler pages dev`

We previously had a bug which logged an error (`local worker: TypeError: generateASSETSBinding2 is not a function`). This has now been fixed.
2 changes: 1 addition & 1 deletion packages/wrangler/src/dev/local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ export async function transformMf2OptionsToMf3Options({
// relies on the fact that `require` is untyped.
//
// eslint-disable-next-line @typescript-eslint/no-var-requires
const generateASSETSBinding = require("../miniflare-cli/assets");
const generateASSETSBinding = require("../miniflare-cli/assets").default;
options.serviceBindings = {
...options.serviceBindings,
ASSETS: (await generateASSETSBinding({
Expand Down

0 comments on commit 226e63f

Please sign in to comment.