Skip to content

Commit a54d88c

Browse files
revert change to pages dev mode config loading
1 parent 1ff3f30 commit a54d88c

File tree

1 file changed

+2
-5
lines changed
  • packages/wrangler/src/pages

1 file changed

+2
-5
lines changed

packages/wrangler/src/pages/dev.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { dirname, join, normalize, resolve } from "node:path";
44
import { watch } from "chokidar";
55
import * as esbuild from "esbuild";
66
import { unstable_dev } from "../api";
7-
import { configFileName, readPagesConfig } from "../config";
7+
import { configFileName, readConfig } from "../config";
88
import { isBuildFailure } from "../deployment-bundle/build-failures";
99
import { shouldCheckFetch } from "../deployment-bundle/bundle";
1010
import { esbuildAliasExternalPlugin } from "../deployment-bundle/esbuild-plugins/alias-external";
@@ -303,10 +303,7 @@ export const Handler = async (args: PagesDevArguments) => {
303303

304304
// for `dev` we always use the top-level config, which means we need
305305
// to read the config file with `env` set to `undefined`
306-
const config = readPagesConfig(
307-
{ ...args, env: undefined },
308-
{ useRedirect: true }
309-
);
306+
const config = readConfig({ ...args, env: undefined }, { useRedirect: true });
310307
const resolvedDirectory = args.directory ?? config.pages_build_output_dir;
311308
const [_pages, _dev, ...remaining] = args._;
312309
const command = remaining;

0 commit comments

Comments
 (0)