Conversation
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepare this repository to publish
@module-federation/tanstackfor TanStack Start on Vite and Rsbuild/Rspack. The package now isolates each bundler adapter behind its own export and uses optional peer dependencies, so a project only installs and resolves the Module Federation plugin for its bundler.Rslib builds conditional ESM and CommonJS outputs with matching declarations. Four runnable TanStack Start applications exercise Vite, Rsbuild, same-bundler federation, and reciprocal client-side manifest interoperability.
Changes
/viteadapter using@module-federation/vite/rsbuildusing@module-federation/rsbuild-plugin, with browser script/JSONP compatibility and optional async-node CommonJS SSR output.js/.d.tsESM plus.cjs/.d.ctsCommonJS artifactsapps/vite-hostandapps/vite-remote, alongside the newRsbuild/Rspack host and remote apps
TODO.mdTesting
pnpm install --frozen-lockfilepnpm format:checkpnpm exec tsc -b --force --pretty falsepnpm typecheckpnpm test(22 tests, including live Vite/Rsbuild runtime shells)pnpm pack:tanstackactionlintdocs-listgit diff --checkReview notes
Accepted findings fixed during review: remote loader stale state, Vite hydration mismatch, and preserving ESM filenames when CommonJS forcing is disabled.
Two findings were rejected with direct build evidence: Rslib 1.0.1 accepts the
--lib esmand--lib cjsselectors used here, and Rsbuild's environment-scoped Module Federation instances produce both browser and SSR manifests despite sharing the upstream plugin name.Follow-up
Follow
TODO.mdfor the Rsbuild SSR fixture, cross-bundler server-entry transport,shared React identity, outage recovery, and version matrix. The current examples
and tests claim client manifest interoperability only, not cross-bundler SSR
remote rendering.