Skip to content

turbopack: Support query conditions in rules#87291

Closed
jwueller wants to merge 1 commit intovercel:canaryfrom
jwueller:feature/turbopack-query-conditions
Closed

turbopack: Support query conditions in rules#87291
jwueller wants to merge 1 commit intovercel:canaryfrom
jwueller:feature/turbopack-query-conditions

Conversation

@jwueller
Copy link

Accepts a regular expression under the query key in turbopack conditions. An updated example has been added to the documentation.

This is roughly equivalent to the resourceQuery condition in webpack rules: https://webpack.js.org/configuration/module/#ruleresourcequery

Fixes #65360
Fixes #67452
Fixes #79311

@nextjs-bot nextjs-bot added Documentation Related to Next.js' official documentation. tests Turbopack Related to Turbopack with Next.js. type: next labels Dec 18, 2025
@nextjs-bot
Copy link
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: 49d9237

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Dec 18, 2025

Allow CI Workflow Run

  • approve CI run for commit: 3088c61

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@jwueller jwueller force-pushed the feature/turbopack-query-conditions branch from 49d9237 to 60c6c0c Compare December 18, 2025 01:34
@jwueller jwueller force-pushed the feature/turbopack-query-conditions branch from 60c6c0c to 0bf7aee Compare December 19, 2025 17:24
Accepts a regular expression under the `query` key in turbopack
conditions. An updated example has been added to the documentation.

This is roughly equivalent to the `resourceQuery` condition in webpack
rules: https://webpack.js.org/configuration/module/#ruleresourcequery

Fixes vercel#65360
Fixes vercel#67452
Fixes vercel#79311
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 20, 2026

Failing test suites

Commit: 67a1d11 | About building and testing Next.js

pnpm test-dev test/development/app-dir/browser-log-forwarding/fixtures/verbose-level/verbose-level.test.ts (job)

  • browser-log-forwarding verbose level > should forward all logs to terminal (DD)
Expand output

● browser-log-forwarding verbose level › should forward all logs to terminal

expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `browser-log-forwarding verbose level should forward all logs to terminal 1`

- Snapshot  - 1
+ Received  + 0

  [browser] browser log: this is a log message (app/page.tsx:7:13)
  [browser] browser info: this is an info message (app/page.tsx:8:13)
  [browser] browser warn: this is a warning message (app/page.tsx:9:13)
  [browser] browser error: this is an error message 
- [browser] browser debug: this is a debug message (app/page.tsx:11:13)

  36 |       .join('\n')
  37 |
> 38 |     expect(browserLogs).toMatchInlineSnapshot(`
     |                         ^
  39 |      "[browser] browser log: this is a log message (app/page.tsx:7:13)
  40 |      [browser] browser info: this is an info message (app/page.tsx:8:13)
  41 |      [browser] browser warn: this is a warning message (app/page.tsx:9:13)

  at Object.toMatchInlineSnapshot (development/app-dir/browser-log-forwarding/fixtures/verbose-level/verbose-level.test.ts:38:25)

pnpm test-start-turbo test/e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts (turbopack) (job)

  • app dir client cache with parallel routes > prefetch={true} > should prefetch the full page (DD)
Expand output

● app dir client cache with parallel routes › prefetch={true} › should prefetch the full page

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  29 |
  30 |   describe('prefetch={true}', () => {
> 31 |     it('should prefetch the full page', async () => {
     |     ^
  32 |       let page: PlaywrightPage
  33 |       const browser = await next.browser('/', {
  34 |         async beforePageLoad(p) {

  at it (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:31:5)
  at describe (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:30:3)
  at Object.describe (e2e/app-dir/app-client-cache/client-cache.parallel-routes.test.ts:7:1)

Copy link
Member

sokra commented Jan 21, 2026

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

sokra added a commit that referenced this pull request Jan 22, 2026
@jwueller
Copy link
Author

@sokra I'm not sure if you can mark this PR as manually merged or something like that, but either way you're free to close it since my contribution has been integrated by your rebase.

Did I end up getting added to the changelog manually, by the way? I don't think I've received any notifications for that.

@jwueller jwueller closed this Jan 28, 2026
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Documentation Related to Next.js' official documentation. locked tests Turbopack Related to Turbopack with Next.js. type: next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Turbopack Fails with ResourceQuery in Glob Pattern

3 participants