Skip to content

Commit

Permalink
[cli] Normalize Builder output paths in vc dev (vercel#8461)
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate authored Aug 25, 2022
1 parent ead1e41 commit 873f549
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/cli/src/util/dev/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Lambda,
FileBlob,
FileFsRef,
normalizePath,
} from '@vercel/build-utils';
import { isOfficialRuntime } from '@vercel/fs-detectors';
import plural from 'pluralize';
Expand Down Expand Up @@ -269,7 +270,9 @@ export async function executeBuild(
const { cleanUrls } = vercelConfig;

// Mimic fmeta-util and perform file renaming
Object.entries(output).forEach(([path, value]) => {
for (const [originalPath, value] of Object.entries(output)) {
let path = normalizePath(originalPath);

if (cleanUrls && path.endsWith('.html')) {
path = path.slice(0, -5);

Expand All @@ -284,7 +287,7 @@ export async function executeBuild(
}

output[path] = value;
});
}

// Convert the JSON-ified output map back into their corresponding `File`
// subclass type instances.
Expand Down

0 comments on commit 873f549

Please sign in to comment.