Skip to content

TURBOPACK: alias resolve lost query param#88891

Merged
mischnic merged 2 commits intovercel:canaryfrom
fireairforce:fix-resource-query-alias
Mar 6, 2026
Merged

TURBOPACK: alias resolve lost query param#88891
mischnic merged 2 commits intovercel:canaryfrom
fireairforce:fix-resource-query-alias

Conversation

@fireairforce
Copy link
Contributor

turbopack-resolve alias lost query as the following case:

import a from '@/a?query'

console.log(a);

alias config is:

resolveAlias: {
  '@/*': './app/*'
}

The query param will lost, i fix this and add some test case.

@nextjs-bot nextjs-bot added tests Turbopack Related to Turbopack with Next.js. labels Jan 22, 2026
@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 22, 2026

Tests Passed

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 22, 2026

Merging this PR will not alter performance

✅ 17 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing fireairforce:fix-resource-query-alias (e3febcf) with canary (18b9463)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mischnic
Copy link
Member

This is strange, maybe some infinite loop/recursion?

  FAIL Turbopack test/production/pages-dir/production/test/index.test.ts (121.294 s)

    Creating an optimized production build ...
  Failed to create next instance Error: next build failed with code/signal SIGKILL
      at ChildProcess.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/lib/next-modes/next-start.ts:79:17)
      at ChildProcess.emit (node:events:514:28)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)
  Stopped next server
  destroyed next instance: 141.002ms

@fireairforce fireairforce force-pushed the fix-resource-query-alias branch from cbd4c37 to 7222807 Compare January 22, 2026 14:57
@fireairforce
Copy link
Contributor Author

This is strange, maybe some infinite loop/recursion?

  FAIL Turbopack test/production/pages-dir/production/test/index.test.ts (121.294 s)

    Creating an optimized production build ...
  Failed to create next instance Error: next build failed with code/signal SIGKILL
      at ChildProcess.<anonymous> (/root/actions-runner/_work/next.js/next.js/test/lib/next-modes/next-start.ts:79:17)
      at ChildProcess.emit (node:events:514:28)
      at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)
  Stopped next server
  destroyed next instance: 141.002ms

add a judge for that case, now the test case will be passed

@fireairforce
Copy link
Contributor Author

fireairforce commented Feb 3, 2026

Updated~ @mischnic now the test case all passed, feel free to review

Copy link
Contributor

@lukesandberg lukesandberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good, comparing patterns should be more reliable than request vcs.

@fireairforce fireairforce force-pushed the fix-resource-query-alias branch from 3674df7 to fbd2020 Compare February 5, 2026 09:42
@fireairforce fireairforce force-pushed the fix-resource-query-alias branch from 168895c to 4a8a377 Compare February 24, 2026 11:39
@fireairforce
Copy link
Contributor Author

fireairforce commented Mar 2, 2026

now all the test case pass, can you please help me to merge this? @lukesandberg @mischnic thanks

@mischnic mischnic merged commit 2c2dd5f into vercel:canary Mar 6, 2026
150 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Turbopack Related to Turbopack with Next.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants