Integration with Webpack
mainThe plugin is compatible with Webpack Module Federation. You can use components exposed by vite-plugin-federation in a Webpack project, or use components exposed by Webpack's ModuleFederationPlugin in a Vite project.
Important Notes:
- When using Webpack to consume Vite-exposed components, it is recommended to use the
esmformat as other formats lack complete test coverage. - For React projects, mixing Vite/Rollup and Webpack is discouraged because inconsistent
commonjschunk generation can cause issues withshareddependencies. - When using different bundling frameworks, you may need to specify
remotes.fromandremotes.formatproperties for better compatibility.