Skip to content

Commit

Permalink
Add clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Jan 8, 2025
1 parent 893f7e9 commit 88544ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/wrangler/src/deployment-bundle/resolve-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export function resolveEntryWithMain(
relativePath: string;
projectRoot: string;
} {
// The project root is where the user defined the Worker via the Wrangler configuration (or the current working directory).
// The entry root is the base path used in bundling the source code for the Worker,
// which may be different from the project root if the Wrangler was redirected to use a different Wrangler configuration file.
const projectRoot = path.resolve(path.dirname(config.userConfigPath ?? "."));
const entryRoot = path.resolve(path.dirname(config.configPath ?? "."));
const absolutePath = path.resolve(entryRoot, main);
Expand Down

0 comments on commit 88544ec

Please sign in to comment.