core icon indicating copy to clipboard operation
core copied to clipboard

fix(rsbuild-plugin): support other output formats

Open ScriptedAlchemy opened this issue 8 months ago • 2 comments

Description

This pull request includes several changes to the @module-federation/rsbuild-plugin and configuration files to enhance functionality and improve plugin behavior. The most important changes include the addition of a new option to force Module Federation on all formats, adjustments to chunk loading settings, and updates to configuration files to include the rsbuild-plugin package.

Enhancements to @module-federation/rsbuild-plugin:

  • Added forceMfOnAllFormats option to ModuleFederationOptions to allow overriding the default format check and enable Module Federation on all formats (packages/rsbuild-plugin/src/cli/index.ts).
  • Updated pluginModuleFederation function to respect the forceMfOnAllFormats option and prevent setting chunkLoading to jsonp when chunkFormat is module (packages/rsbuild-plugin/src/cli/index.ts). [1] [2] [3] [4]

Configuration file updates:

  • Added .changeset entries to document the new forceMfOnAllFormats option and the change in chunk loading behavior (.changeset/breezy-tools-serve.md, .changeset/lovely-waves-draw.md). [1] [2]
  • Updated .cursorignore to include the rsbuild-plugin package and its contents (.cursorignore). [1] [2]

Resolved runtime errors when chunk format is esm module

Related Issue

https://github.com/module-federation/module-federation-examples/pull/4342

Types of changes

  • [ ] Docs change / refactoring / dependency upgrade
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)

Checklist

  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.
  • [ ] I have updated the documentation.

ScriptedAlchemy avatar Feb 28 '25 21:02 ScriptedAlchemy