Unverified Commit 6472fb5c authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Always log the used bundler, even for webpack (#83418)

For `next build` and `next dev`, log that webpack is used
```
   ▲ Next.js 15.5.1-canary.26 (webpack)

   Creating an optimized production build ...
 ✓ Compiled successfully in 1244ms
   Linting and checking validity of types  ..
 ⚠ The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/app/api-reference/config/eslint#migrating-existing-config
 ✓ Linting and checking validity of types
 ✓ Collecting page data
 ✓ Generating static pages (3/3)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

```
parent af962cb2
...@@ -1083,6 +1083,7 @@ export default async function build( ...@@ -1083,6 +1083,7 @@ export default async function build(
appUrl: null, appUrl: null,
envInfo, envInfo,
experimentalFeatures, experimentalFeatures,
logBundler: true,
}) })
const ignoreESLint = Boolean(config.eslint.ignoreDuringBuilds) const ignoreESLint = Boolean(config.eslint.ignoreDuringBuilds)
......
...@@ -12,19 +12,23 @@ export function logStartInfo({ ...@@ -12,19 +12,23 @@ export function logStartInfo({
appUrl, appUrl,
envInfo, envInfo,
experimentalFeatures, experimentalFeatures,
logBundler,
}: { }: {
networkUrl: string | null networkUrl: string | null
appUrl: string | null appUrl: string | null
envInfo?: string[] envInfo?: string[]
experimentalFeatures?: ConfiguredExperimentalFeature[] experimentalFeatures?: ConfiguredExperimentalFeature[]
logBundler: boolean
}) { }) {
let bundlerSuffix let bundlerSuffix = ''
if (process.env.TURBOPACK) { if (logBundler) {
bundlerSuffix = ' (Turbopack)' if (process.env.TURBOPACK) {
} else if (process.env.NEXT_RSPACK) { bundlerSuffix = ' (Turbopack)'
bundlerSuffix = ' (Rspack)' } else if (process.env.NEXT_RSPACK) {
} else { bundlerSuffix = ' (Rspack)'
bundlerSuffix = '' } else {
bundlerSuffix = ' (webpack)'
}
} }
Log.bootstrap( Log.bootstrap(
......
...@@ -377,6 +377,7 @@ export async function startServer( ...@@ -377,6 +377,7 @@ export async function startServer(
appUrl, appUrl,
envInfo, envInfo,
experimentalFeatures, experimentalFeatures,
logBundler: isDev,
}) })
Log.event(`Starting...`) Log.event(`Starting...`)
......
...@@ -32,7 +32,7 @@ describe('build-output-prerender', () => { ...@@ -32,7 +32,7 @@ describe('build-output-prerender', () => {
`) `)
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z "▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents ✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -56,7 +56,7 @@ describe('build-output-prerender', () => { ...@@ -56,7 +56,7 @@ describe('build-output-prerender', () => {
`) `)
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z "▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents ✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -78,7 +78,7 @@ describe('build-output-prerender', () => { ...@@ -78,7 +78,7 @@ describe('build-output-prerender', () => {
`) `)
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z "▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents ✓ cacheComponents
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`) ✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
...@@ -150,7 +150,7 @@ describe('build-output-prerender', () => { ...@@ -150,7 +150,7 @@ describe('build-output-prerender', () => {
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production. "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
▲ Next.js x.y.z ▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents ✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -182,7 +182,7 @@ describe('build-output-prerender', () => { ...@@ -182,7 +182,7 @@ describe('build-output-prerender', () => {
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production. "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
▲ Next.js x.y.z ▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents ✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -212,7 +212,7 @@ describe('build-output-prerender', () => { ...@@ -212,7 +212,7 @@ describe('build-output-prerender', () => {
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production. "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
▲ Next.js x.y.z ▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents ✓ cacheComponents
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`) ✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
...@@ -281,7 +281,7 @@ describe('build-output-prerender', () => { ...@@ -281,7 +281,7 @@ describe('build-output-prerender', () => {
`) `)
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z "▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`) ✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -303,7 +303,7 @@ describe('build-output-prerender', () => { ...@@ -303,7 +303,7 @@ describe('build-output-prerender', () => {
`) `)
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z "▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -318,7 +318,7 @@ describe('build-output-prerender', () => { ...@@ -318,7 +318,7 @@ describe('build-output-prerender', () => {
) )
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot( expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(
`"▲ Next.js x.y.z"` `"▲ Next.js x.y.z (webpack)"`
) )
} }
} }
...@@ -354,7 +354,7 @@ describe('build-output-prerender', () => { ...@@ -354,7 +354,7 @@ describe('build-output-prerender', () => {
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production. "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
▲ Next.js x.y.z ▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`) ✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -385,7 +385,7 @@ describe('build-output-prerender', () => { ...@@ -385,7 +385,7 @@ describe('build-output-prerender', () => {
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production. "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
▲ Next.js x.y.z ▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`) ✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
...@@ -411,7 +411,7 @@ describe('build-output-prerender', () => { ...@@ -411,7 +411,7 @@ describe('build-output-prerender', () => {
} else { } else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(` expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production. "⚠ Prerendering is running in debug mode. Note: This may affect performance and should not be used for production.
▲ Next.js x.y.z ▲ Next.js x.y.z (webpack)
- Experiments (use with caution): - Experiments (use with caution):
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`) ✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`) ⨯ prerenderEarlyExit (disabled by \`--debug-prerender\`)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment