Skip to content

Commit

Permalink
The pathing to Site assetDirectory needs to be absolute and relative
Browse files Browse the repository at this point in the history
added a join to the helper that is passed into Dev for asset paths.
  • Loading branch information
JacobMGEvans authored and petebacondarwin committed Mar 22, 2022
1 parent bf3e499 commit 8bd7151
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/wrangler/src/dev/local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ function useLocalWorker({
),
durableObjectsPersist: enableLocalPersistence,
cachePersist: enableLocalPersistence,
sitePath: assetPaths?.assetDirectory,
sitePath: assetPaths?.assetDirectory
? path.join(assetPaths.baseDirectory, assetPaths.assetDirectory)
: undefined,
siteInclude: assetPaths?.includePatterns.length
? assetPaths?.includePatterns
: undefined,
Expand Down
1 change: 1 addition & 0 deletions packages/wrangler/src/sites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export function getAssetPaths(
const baseDirectory = path.resolve(
path.dirname(config.configPath ?? "wrangler.toml")
);

return assetDirectory
? {
baseDirectory,
Expand Down

0 comments on commit 8bd7151

Please sign in to comment.