fix(enhanced): add esm export for runtime entry to fix vite resolution#4682
fix(enhanced): add esm export for runtime entry to fix vite resolution#46822heal1 merged 2 commits intomodule-federation:mainfrom
Conversation
module-federation#4680) This change adds an ESM export for the runtime entry in @module-federation/enhanced to resolve Vite compatibility issues where it couldn't properly resolve the module. - Modified `packages/enhanced/package.json` to include `.mjs` import for the runtime entry. - Updated `packages/enhanced/tsdown.config.mts` to build the ESM runtime entry with `.mjs` extension. Fixes module-federation#4680 Co-Authored-By: Aime <aime@bytedance.com> Change-Id: If3915f016731bb1a3612ec4e4c9c2cc2cd84ecca
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/data-prefetch
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/esbuild
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/modern-js
@module-federation/modern-js-v3
@module-federation/native-federation-tests
@module-federation/native-federation-typescript
@module-federation/nextjs-mf
@module-federation/node
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/storybook-addon
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/typescript
@module-federation/utilities
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Bundle Size Report10 package(s) changed, 30 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 6.33 MB (+6.6 kB (+0.1%)) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
This change adds an ESM export for the runtime entry in @module-federation/enhanced to resolve Vite compatibility issues where it couldn't properly resolve the module.
packages/enhanced/package.jsonto include.mjsimport for the runtime entry.packages/enhanced/tsdown.config.mtsto build the ESM runtime entry with.mjsextension.Fixes #4680
Change-Id: If3915f016731bb1a3612ec4e4c9c2cc2cd84ecca
Description
Related Issue
#4680
Types of changes
Checklist