Skip to content

Commit

Permalink
fixup! Implement foundations for additional bundler option
Browse files Browse the repository at this point in the history
  • Loading branch information
wbinnssmith committed Feb 14, 2025
1 parent 1b42701 commit b420cbf
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions packages/next/src/build/collect-build-traces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import type { NodeFileTraceReasons } from '@vercel/nft'
import type { RoutesUsingEdgeRuntime } from './utils'

const debug = debugOriginal('next:build:build-traces')
const isRspack = process.env.NEXT_RSPACK !== undefined

function shouldIgnore(
file: string,
Expand Down Expand Up @@ -396,14 +395,6 @@ export async function collectBuildTraces({
const { entryNameFilesMap } = buildTraceContext?.chunksTrace || {}

const cachedLookupIgnoreRoutes = new Map<string, boolean>()
let chunks: string[] = []

// we aren't getting all chunks in the trace-entrypoint plugin
// with rspack currently so for now just add them manually for
// all trace files
if (isRspack) {
chunks = await fs.readdir(path.join(distDir, 'server', 'chunks'))
}

await Promise.all(
[
Expand Down Expand Up @@ -472,19 +463,6 @@ export async function collectBuildTraces({
curTracedFiles.add(file)
}

if (isRspack) {
for (const file of chunks) {
curTracedFiles.add(
path
.relative(
traceOutputDir,
path.join(distDir, 'server/chunks', file)
)
.replace(/\\/g, '/')
)
}
}

await fs.writeFile(
traceOutputPath,
JSON.stringify({
Expand Down

0 comments on commit b420cbf

Please sign in to comment.