Skip to content

Commit

Permalink
revert change to pages dev mode config loading
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Dec 15, 2024
1 parent 9b00c64 commit 0e8fc8a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/wrangler/src/pages/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { dirname, join, normalize, resolve } from "node:path";
import { watch } from "chokidar";
import * as esbuild from "esbuild";
import { unstable_dev } from "../api";
import { configFileName, readPagesConfig } from "../config";
import { configFileName, readConfig } from "../config";
import { isBuildFailure } from "../deployment-bundle/build-failures";
import { shouldCheckFetch } from "../deployment-bundle/bundle";
import { esbuildAliasExternalPlugin } from "../deployment-bundle/esbuild-plugins/alias-external";
Expand Down Expand Up @@ -303,10 +303,7 @@ export const Handler = async (args: PagesDevArguments) => {

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

0 comments on commit 0e8fc8a

Please sign in to comment.