Skip to content

Build failure: export * from in "use client" files not supported by RSC plugin #1352

Description

@james-elicx

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-20).

Problem

@vitejs/plugin-rsc's use-client transform generates client reference proxies for each export, but it does not handle export * from '...' (namespace re-exports). It only supports named exports and default exports.

[plugin rsc:use-client] components/export-all/index.js
Error: unsupported ExportAllDeclaration
    at transformProxyExport (.../plugin-rsc/dist/transforms/index.js:338:90)

Next.js's Webpack plugin resolves export * to individual named exports before generating proxies.

Estimated Impact

~1 build failure.

Affected Test Suites

  • An app-dir test using export * from '...' in a "use client" module

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test with a "use client" file that uses export * from './other' and verify the build fails.

  2. This is likely an upstream @vitejs/plugin-rsc issue. File an issue on the RSC plugin repo if one doesn't exist, or implement a workaround in vinext's build pipeline that pre-resolves export * declarations in "use client" files before the RSC transform runs.

  3. As a workaround, users can replace export * from with explicit named re-exports in "use client" files.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions