Skip to content

Commit

Permalink
feat(pages): fix --script-path resolving when using a proxy command (#…
Browse files Browse the repository at this point in the history
…3399)

* wip: fix script path resolving

* chore: changeset
  • Loading branch information
Skye-31 authored Jun 6, 2023
1 parent ab2cdf4 commit d8a9995
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/clean-seahorses-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Fix: wrangler pages dev --script-path argument when using a proxy command instead of directory mode

Fixes a regression in [email protected], where `wrangler pages dev --script-path=<my script path> -- <proxy command>` would start throwing esbuild errors.
2 changes: 1 addition & 1 deletion packages/wrangler/src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ async function applyMiddlewareLoaderFacade(
format: "esm",
plugins: [
esbuildAliasExternalPlugin({
__ENTRY_POINT__: entry.file,
__ENTRY_POINT__: path.resolve(entry.directory, entry.file),
...Object.fromEntries(
middleware.map((val, index) => [
middlewareIdentifiers[index],
Expand Down

0 comments on commit d8a9995

Please sign in to comment.