Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/open-next/src/build/copyTracedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
import path from "node:path";

import { loadConfig, loadPrerenderManifest } from "config/util.js";
import { getCrossPlatformPathRegex } from "utils/regex.js";
import logger from "../logger.js";
import { MIDDLEWARE_TRACE_FILE } from "./constant.js";

Expand All @@ -30,9 +31,7 @@ const EXCLUDED_PACKAGES = [

function isExcluded(srcPath: string) {
return EXCLUDED_PACKAGES.some((excluded) =>
new RegExp(`${path.sep}node_modules${path.sep}${excluded}${path.sep}`).test(
srcPath,
),
srcPath.match(getCrossPlatformPathRegex(`/node_modules/${excluded}/`)),
);
}

Expand Down
Loading