feat(rspress): support remote code block transforms - #4931
Conversation
🦋 Changeset detectedLatest commit: 39467d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 47 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@module-federation/devtools
@module-federation/cli
create-module-federation
@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/metro-plugin-rock
@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/observability-plugin
@module-federation/playground
@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: |
|
🚀 Preview Environment Ready!
Details:
|
Bundle Size Report7 package(s) changed, 35 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 35.80 MB (+10.5 kB (+0.0%)) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
Description
Adds an opt-in code-block transformation capability to
@module-federation/rspress-plugin.Producer documents can keep ordinary fenced code blocks. A consumer can pass a transformer to a remote document to replace matching code content without creating a dedicated component in the producer. The transformed result is also available to SSG output, generated Markdown, and LLM text output.
This change includes the public helper, runtime handling, Markdown integration, tests, documentation, and a patch changeset.
Validation completed:
pnpm exec prettier --check .pnpm exec turbo run build --filter=@module-federation/rspress-pluginpnpm exec turbo run test --filter=@module-federation/rspress-pluginllms-full.txtThe full repository test suite was not run; validation was scoped to the affected package and its dependencies, plus the end-to-end SSG scenario.
Related Issue
No linked issue.
Types of changes
Checklist