Skip to content

Conversation

hi-ogawa
Copy link
Contributor

Description

wakujs/waku#1653 is broken when group virtual id ends up with special query such as ?commonjs-exports, for example,

$ DEBUG=vite-rsc:use-client pnpm -C e2e/fixtures/use-router build
...
  'non-facade:\x00/home/hiroshi/code/others/waku/node_modules/.pnpm/[email protected]/node_modules/react/cjs/react-jsx-runtime.react-server.development.js?commonjs-exports': [
    {
      importId: '/home/hiroshi/code/others/waku/e2e/fixtures/use-router/src/TestRouter.tsx',
      referenceKey: '8a1f82ac61f9',
      packageSource: undefined,
      exportNames: [Array],
      renderedExports: [Array],
      serverChunk: 'non-facade:\x00/home/hiroshi/code/others/waku/node_modules/.pnpm/[email protected]/node_modules/react/cjs/react-jsx-runtime.react-server.development.js?commonjs-exports',
      groupChunkId: '\x00virtual:vite-rsc/client-references/group/non-facade:\x00/home/hiroshi/code/others/waku/node_modules/.pnpm/[email protected]/node_modules/react/cjs/react-jsx-runtime.react-server.development.js?commonjs-exports'
    }
  ],
...

@hi-ogawa hi-ogawa added the trigger: preview Trigger pkg.pr.new label Aug 24, 2025
Copy link

pkg-pr-new bot commented Aug 24, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@vitejs/plugin-react@770
npm i https://pkg.pr.new/@vitejs/plugin-react-oxc@770
npm i https://pkg.pr.new/@vitejs/plugin-rsc@770
npm i https://pkg.pr.new/@vitejs/plugin-react-swc@770

commit: 3f5cb60

@hi-ogawa hi-ogawa changed the title fix(rsc): remove special query from group chunk virtual id fix(rsc): normalize group chunk virtual id properly Aug 24, 2025
@hi-ogawa hi-ogawa marked this pull request as ready for review August 25, 2025 03:26
@hi-ogawa hi-ogawa merged commit 9869e2c into main Aug 25, 2025
21 checks passed
@hi-ogawa hi-ogawa deleted the 08-24-fix_rsc_remove_special_query_from_group_chunk_virtual_id branch August 25, 2025 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trigger: preview Trigger pkg.pr.new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant