Skip to content

Commit 0e62b1b

Browse files
mischnicwbinnssmith
authored andcommitted
Fixup
1 parent 5b5cb8c commit 0e62b1b

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

packages/next/src/build/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3737,7 +3737,12 @@ function warnAboutTurbopackBuilds(config?: NextConfigComplete) {
37373737
`We don't recommend deploying mission-critical applications to production.`
37383738
)
37393739
warningStr +=
3740-
'\n\n- It is expected that your bundle size might be different from `next build` with webpack. This will be improved as we work towards stability.'
3740+
'\n\n- ' +
3741+
bold(
3742+
'Turbopack currently always builds production sourcemaps for the browser. This will include project sourcecode if deployed to production.'
3743+
)
3744+
warningStr +=
3745+
'\n- It is expected that your bundle size might be different from `next build` with webpack. This will be improved as we work towards stability.'
37413746

37423747
if (!config?.experimental.turbopackPersistentCaching) {
37433748
warningStr +=

packages/next/src/server/config.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -669,27 +669,21 @@ function assignDefaults(
669669
result.deploymentId = process.env.NEXT_DEPLOYMENT_ID
670670
}
671671

672-
if (result?.outputFileTracingRoot && !result?.experimental?.turbo?.root) {
673-
dset(
674-
result,
675-
['experimental', 'turbo', 'root'],
676-
result.outputFileTracingRoot
677-
)
672+
if (result?.outputFileTracingRoot && !result?.turbopack?.root) {
673+
dset(result, ['turbopack', 'root'], result.outputFileTracingRoot)
678674
}
679675

680676
// use the closest lockfile as tracing root
681-
if (!result?.outputFileTracingRoot || !result?.experimental?.turbo?.root) {
677+
if (!result?.outputFileTracingRoot || !result?.turbopack?.root) {
682678
let rootDir = findRootDir(dir)
683679

684680
if (rootDir) {
685681
if (!result?.outputFileTracingRoot) {
686682
result.outputFileTracingRoot = rootDir
687-
defaultConfig.outputFileTracingRoot = result.outputFileTracingRoot
688683
}
689684

690-
if (!result?.experimental?.turbo?.root) {
691-
dset(result, ['experimental', 'turbo', 'root'], rootDir)
692-
dset(defaultConfig, ['experimental', 'turbo', 'root'], rootDir)
685+
if (!result?.turbopack?.root) {
686+
dset(result, ['turbopack', 'root'], rootDir)
693687
}
694688
}
695689
}

0 commit comments

Comments
 (0)