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 empty config with Turbopack does not show webpack warning #64109

Conversation

timneutkens
Copy link
Member

@timneutkens timneutkens commented Apr 5, 2024

What?

There's a bug currently that shows the "webpack has been configured" warning incorrectly:

pnpm next dev --turbo examples/hello-world

> nextjs-project@0.0.0 next /Users/timneutkens/projects/next.js
> cross-env NEXT_TELEMETRY_DISABLED=1 node --trace-deprecation --enable-source-maps packages/next/dist/bin/next "dev" "--turbo" "examples/hello-world"

  ▲ Next.js 14.2.0-canary.58 (turbo)
  - Local:        http://localhost:3000

 ✓ Starting...
 ✓ Ready in 791ms
 ⚠ Webpack is configured while Turbopack is not, which may cause problems.
 ⚠ See instructions if you need to configure Turbopack:
  https://nextjs.org/docs/app/api-reference/next-config-js/turbo

This PR ensures the warning is only shown when you have actually configured webpack in next.config.js.

Closes NEXT-3013

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @timneutkens and the rest of your teammates on Graphite Graphite

@ijjk
Copy link
Member

ijjk commented Apr 5, 2024

Failing test suites

Commit: f0b66b3

pnpm test-dev test/e2e/app-dir/app/index.test.ts (PPR)

  • app dir - basic > known bugs > should support React cache > server component client-navigation
Expand output

● app dir - basic › known bugs › should support React cache › server component client-navigation

expect(received).toBe(expected) // Object.is equality

Expected: "0.7282814095165713"
Received: "0.7104008879336707"

  1424 |           const val1 = await browser.elementByCss('#value-1').text()
  1425 |           const val2 = await browser.elementByCss('#value-2').text()
> 1426 |           expect(val1).toBe(val2)
       |                        ^
  1427 |         })
  1428 |
  1429 |         it('client component', async () => {

  at Object.toBe (e2e/app-dir/app/index.test.ts:1426:24)

Read more about building and testing Next.js in contributing.md.

pnpm test-dev test/e2e/app-dir/navigation/navigation.test.ts

  • app dir - navigation > browser back to a revalidated page > should load the page
Expand output

● app dir - navigation › browser back to a revalidated page › should load the page

page.waitForSelector: Timeout 60000ms exceeded.
Call log:
  - waiting for locator('#submit-button')

  421 |     return this.chain(() => {
  422 |       return page
> 423 |         .waitForSelector(selector, { timeout, state: 'attached' })
      |          ^
  424 |         .then(async (el) => {
  425 |           // it seems selenium waits longer and tests rely on this behavior
  426 |           // so we wait for the load event fire before returning

  at waitForSelector (lib/browsers/playwright.ts:423:10)

Read more about building and testing Next.js in contributing.md.

@wbinnssmith wbinnssmith enabled auto-merge (squash) April 5, 2024 16:52
@wbinnssmith wbinnssmith merged commit e4b85d5 into canary Apr 5, 2024
78 of 79 checks passed
@wbinnssmith wbinnssmith deleted the 04-05-Ensure_empty_config_with_Turbopack_does_not_show_webpack_warning branch April 5, 2024 16:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants