docs(website): add OriginJS Vite migration guide - #4925
Conversation
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 376039cf8f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const module = await loadRemote('catalog/Product'); | ||
| const Product = module?.default ?? module; |
There was a problem hiding this comment.
Add a result type before reading
default
For TypeScript hosts copying this example, loadRemote declares an uninferred generic result (packages/runtime/src/index.ts:56-58), so this call produces an unknown-like value and module?.default fails strict compilation with TS2339: Property 'default' does not exist on type '{}'. Supply a generic module shape (or otherwise narrow the result) before accessing its default export.
Useful? React with 👍 / 👎.
Description
Adds an OriginJS to
@module-federation/vitemigration guide to the Vite integration documentation.The guide covers supported environments, complete OriginJS and mf-vite remote/host configuration examples, dynamic remote migration, shared dependency and CSS considerations, and incremental deployment guidance.
Reference: module-federation/vite#956
Validation
pnpm exec prettier --check apps/website-new/docs/en/integrations/build-tool/vite.mdxgit diff --checkRelated Issue
N/A — documentation-only migration guide.
Types of changes
Checklist