From 81654199ed2e494663883b8b5f5920b8117ad352 Mon Sep 17 00:00:00 2001 From: Zack Jackson <25274700+ScriptedAlchemy@users.noreply.github.com> Date: Tue, 3 Dec 2024 22:35:50 -0800 Subject: [PATCH] fix(rspack): export container and container reference plugins (#3316) --- .changeset/three-doors-bow.md | 5 +++++ packages/rspack/package.json | 3 ++- packages/rspack/project.json | 2 +- packages/rspack/src/index.ts | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/three-doors-bow.md diff --git a/.changeset/three-doors-bow.md b/.changeset/three-doors-bow.md new file mode 100644 index 00000000000..f8a002b3f02 --- /dev/null +++ b/.changeset/three-doors-bow.md @@ -0,0 +1,5 @@ +--- +'@module-federation/rspack': patch +--- + +re-export ContainerPlugin and ContainerReferencePlugin from rspack core diff --git a/packages/rspack/package.json b/packages/rspack/package.json index b37e0a1a5a4..5239fac0e50 100644 --- a/packages/rspack/package.json +++ b/packages/rspack/package.json @@ -45,7 +45,8 @@ }, "peerDependencies": { "typescript": "^4.9.0 || ^5.0.0", - "vue-tsc": ">=1.0.24" + "vue-tsc": ">=1.0.24", + "@rspack/core": ">=0.7" }, "peerDependenciesMeta": { "typescript": { diff --git a/packages/rspack/project.json b/packages/rspack/project.json index 593c91034fc..cb51a52de8c 100644 --- a/packages/rspack/project.json +++ b/packages/rspack/project.json @@ -13,7 +13,7 @@ "main": "packages/rspack/src/index.ts", "tsConfig": "packages/rspack/tsconfig.lib.json", "assets": [], - "external": ["@module-federation/*"], + "external": ["@module-federation/*", "@rspack/core"], "project": "packages/rspack/package.json", "rollupConfig": "packages/rspack/rollup.config.js", "compiler": "swc", diff --git a/packages/rspack/src/index.ts b/packages/rspack/src/index.ts index 98b8c19fa44..a488f9e47ac 100644 --- a/packages/rspack/src/index.ts +++ b/packages/rspack/src/index.ts @@ -1 +1,4 @@ export { ModuleFederationPlugin } from './ModuleFederationPlugin'; +import { container } from '@rspack/core'; +export const ContainerPlugin = container.ContainerPlugin; +export const ContainerReferencePlugin = container.ContainerReferencePlugin;