Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/three-bikes-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: resolve a regression where `wrangler pages dev` would bind to port 8787 by default instead of 8788 since wrangler@3.38.0
4 changes: 2 additions & 2 deletions packages/wrangler/src/pages/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { existsSync, lstatSync, readFileSync } from "node:fs";
import { join, resolve } from "node:path";
import { watch } from "chokidar";
import * as esbuild from "esbuild";
import { DEFAULT_LOCAL_PORT } from "..";
import { unstable_dev } from "../api";
import { readConfig } from "../config";
import { isBuildFailure } from "../deployment-bundle/build-failures";
Expand Down Expand Up @@ -77,6 +76,7 @@ const SERVICE_BINDING_REGEXP = new RegExp(
);

const DEFAULT_IP = process.platform === "win32" ? "127.0.0.1" : "localhost";
const DEFAULT_PAGES_LOCAL_PORT = 8788;
const DEFAULT_SCRIPT_PATH = "_worker.js";

export function Options(yargs: CommonYargsArgv) {
Expand Down Expand Up @@ -861,7 +861,7 @@ function resolvePagesDevServerSettings(
compatibilityFlags: args.compatibilityFlags ?? config.compatibility_flags,
ip: args.ip ?? config.dev.ip ?? DEFAULT_IP,
// because otherwise `unstable_dev` will default the port number to `0`
port: args.port ?? config.dev?.port ?? DEFAULT_LOCAL_PORT,
port: args.port ?? config.dev?.port ?? DEFAULT_PAGES_LOCAL_PORT,
inspectorPort: args.inspectorPort ?? config.dev?.inspector_port,
localProtocol: args.localProtocol ?? config.dev?.local_protocol,
};
Expand Down