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(
appUrl: null,
envInfo,
experimentalFeatures,
logBundler: true,
})
const ignoreESLint = Boolean(config.eslint.ignoreDuringBuilds)
......
......@@ -12,19 +12,23 @@ export function logStartInfo({
appUrl,
envInfo,
experimentalFeatures,
logBundler,
}: {
networkUrl: string | null
appUrl: string | null
envInfo?: string[]
experimentalFeatures?: ConfiguredExperimentalFeature[]
logBundler: boolean
}) {
let bundlerSuffix
if (process.env.TURBOPACK) {
bundlerSuffix = ' (Turbopack)'
} else if (process.env.NEXT_RSPACK) {
bundlerSuffix = ' (Rspack)'
} else {
bundlerSuffix = ''
let bundlerSuffix = ''
if (logBundler) {
if (process.env.TURBOPACK) {
bundlerSuffix = ' (Turbopack)'
} else if (process.env.NEXT_RSPACK) {
bundlerSuffix = ' (Rspack)'
} else {
bundlerSuffix = ' (webpack)'
}
}
Log.bootstrap(
......
......@@ -377,6 +377,7 @@ export async function startServer(
appUrl,
envInfo,
experimentalFeatures,
logBundler: isDev,
})
Log.event(`Starting...`)
......
......@@ -32,7 +32,7 @@ describe('build-output-prerender', () => {
`)
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -56,7 +56,7 @@ describe('build-output-prerender', () => {
`)
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -78,7 +78,7 @@ describe('build-output-prerender', () => {
`)
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents
✓ enablePrerenderSourceMaps (enabled by \`experimental.cacheComponents\`)
......@@ -150,7 +150,7 @@ describe('build-output-prerender', () => {
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ 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):
✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -182,7 +182,7 @@ describe('build-output-prerender', () => {
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ 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):
✓ cacheComponents
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -212,7 +212,7 @@ describe('build-output-prerender', () => {
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ 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):
✓ cacheComponents
✓ enablePrerenderSourceMaps (enabled by \`--debug-prerender\`)
......@@ -281,7 +281,7 @@ describe('build-output-prerender', () => {
`)
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -303,7 +303,7 @@ describe('build-output-prerender', () => {
`)
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"▲ Next.js x.y.z
"▲ Next.js x.y.z (webpack)
- Experiments (use with caution):
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -318,7 +318,7 @@ describe('build-output-prerender', () => {
)
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(
`"▲ Next.js x.y.z"`
`"▲ Next.js x.y.z (webpack)"`
)
}
}
......@@ -354,7 +354,7 @@ describe('build-output-prerender', () => {
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ 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):
✓ cacheComponents (enabled by \`__NEXT_EXPERIMENTAL_CACHE_COMPONENTS\`)
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -385,7 +385,7 @@ describe('build-output-prerender', () => {
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ 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):
✓ clientParamParsing (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
✓ clientSegmentCache (enabled by \`__NEXT_EXPERIMENTAL_PPR\`)
......@@ -411,7 +411,7 @@ describe('build-output-prerender', () => {
} else {
expect(getPreambleOutput(next.cliOutput)).toMatchInlineSnapshot(`
"⚠ 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):
✓ enablePrerenderSourceMaps (enabled 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