Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we copy map file as well for experimental tracing #68676

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,7 @@ export async function detectChangedEntries({
}

for (const entry of appPaths || []) {
let normalizedEntry = getPageFromPath(entry, pageExtensions)

if (normalizedEntry === '/not-found') {
normalizedEntry = '/_not-found'
}
const normalizedEntry = getPageFromPath(entry, pageExtensions)
await detectChange({ entry, normalizedEntry, type: 'app' })
}

Expand Down
11 changes: 11 additions & 0 deletions packages/next/src/build/flying-shuttle/stitch-builds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ export async function stitchBuilds(
path.join(shuttleDir, entryFile),
path.join(distDir, entryFile)
)
// copy map file as well if it exists
await fs.promises
.copyFile(
path.join(shuttleDir, `${entryFile}.map`),
path.join(distDir, `${entryFile}.map`)
)
.catch((err) => {
if (err.code !== 'ENOENT') {
throw err
}
})
}
const copySema = new Sema(8)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export function getDefineEnv({
}
const serializedDefineEnv = serializeDefineEnv(defineEnv)

if (Boolean(config.experimental.flyingShuttle)) {
if (!dev && Boolean(config.experimental.flyingShuttle)) {
// we delay inlining these values until after the build
// with flying shuttle enabled so we can update them
// without invalidating entries
Expand Down
Loading