Skip to content

feat(dts-plugin): generate virtual remote packages for global declarations#4409

Draft
ScriptedAlchemy wants to merge 24 commits intomainfrom
cursor/remote-types-global-declaration-251a
Draft

feat(dts-plugin): generate virtual remote packages for global declarations#4409
ScriptedAlchemy wants to merge 24 commits intomainfrom
cursor/remote-types-global-declaration-251a

Conversation

@ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented Feb 10, 2026

Summary

  • add virtual remote package generation for remote type declaration output
  • wire virtual package handling into DTSManager and worker compilation flows
  • add tests covering manager behavior and virtual package generation paths

Changed Packages

  • @module-federation/dts-plugin

Changesets

  • .changeset/late-cameras-shake.md (@module-federation/dts-plugin: patch)

Base

  • main

@cursor
Copy link

cursor bot commented Feb 10, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@netlify
Copy link

netlify bot commented Feb 10, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 377339f
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69a237c3328851000743af0c
😎 Deploy Preview https://deploy-preview-4409--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: 377339f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 43 packages
Name Type
@module-federation/dts-plugin Patch
@module-federation/cli Patch
@module-federation/enhanced Patch
@module-federation/manifest Patch
@module-federation/metro Patch
@module-federation/rspack Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rspress-plugin Patch
@module-federation/storybook-addon Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/metro-plugin-rnef Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
remote5 Patch
remote6 Patch
website-new Patch
@module-federation/runtime Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/treeshake-server Patch
@module-federation/treeshake-frontend Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Bundle Size Report

1 package(s) changed, 40 unchanged.

Package Total dist Delta ESM gzip Delta
dts-plugin 655.7 kB +28.6 kB (+4.6%) 24.6 kB +1.2 kB (+5.3%)

Total dist: 6.91 MB (+28.6 kB (+0.4%))
Total ESM gzip: 139.9 kB (+1.2 kB (+0.9%))

@ScriptedAlchemy ScriptedAlchemy changed the title Remote types global declaration fix(dts-plugin): improve remote types global declaration Feb 12, 2026
@ScriptedAlchemy ScriptedAlchemy changed the title fix(dts-plugin): improve remote types global declaration feat(dts-plugin): generate virtual remote packages for global declarations Feb 12, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 14, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@9ac548f

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@9ac548f

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@9ac548f

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/@module-federation/data-prefetch@9ac548f

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@9ac548f

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@9ac548f

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@9ac548f

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@9ac548f

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@9ac548f

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@9ac548f

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@9ac548f

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@9ac548f

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@9ac548f

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@9ac548f

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@9ac548f

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@9ac548f

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@9ac548f

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@9ac548f

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@9ac548f

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@9ac548f

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@9ac548f

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@9ac548f

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@9ac548f

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@9ac548f

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@9ac548f

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@9ac548f

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@9ac548f

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@9ac548f

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@9ac548f

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@9ac548f

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@9ac548f

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@9ac548f

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@9ac548f

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@9ac548f

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@9ac548f

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@9ac548f

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@9ac548f

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@9ac548f

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@9ac548f

commit: 9ac548f

@2heal1
Copy link
Member

2heal1 commented Feb 24, 2026

Could you please tell me what problem this PR is trying to solve? I see it seems will create remote types , but why not just download it ?

ScriptedAlchemy and others added 5 commits February 24, 2026 13:53
Resolve the dts-plugin TYPE-001 failure by correcting package entry paths for
workspace dependencies and updating RawSource usage for webpack typings.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore sdk and error-codes export paths to the filenames emitted by the
current build so CI package resolution no longer fails on these branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants