Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Sep 19, 2024
1 parent c0976b9 commit 2790701
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions integration/vite-prerender-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ function listAllFiles(_dir: string) {

function recurse(dir: string) {
fs.readdirSync(dir).forEach((file) => {
const absolute = path.join(dir, file.replace(path.sep, ""));
const absolute = dir + "/" + file;
if (fs.statSync(absolute).isDirectory()) {
if (![".vite", "assets"].includes(file)) {
return recurse(absolute);
}
} else {
console.log({ dir, file, absolute });
return files.push(absolute);
}
});
Expand All @@ -127,7 +128,15 @@ function listAllFiles(_dir: string) {
recurse(_dir);

// Normalize *nix/windows paths
return files.map((f) => path.relative(_dir, f).replace("\\", "/"));
return files.map((f) => {
console.log({
dir: _dir,
f,
relative: path.relative(_dir, f),
result: path.relative(_dir, f).replace("\\", "/"),
});
return path.relative(_dir, f).replace("\\", "/");
});
}

test.describe("Prerendering", () => {
Expand Down

0 comments on commit 2790701

Please sign in to comment.