Skip to content

Commit e98133e

Browse files
authored
feat: Re-export the exports of the v18/v19/plugin from @module-federation/bridge-react in modernjs (#4168)
1 parent dc103ee commit e98133e

File tree

6 files changed

+54
-2
lines changed

6 files changed

+54
-2
lines changed

.changeset/empty-shrimps-jam.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@module-federation/bridge-react': patch
3+
'@module-federation/modern-js': patch
4+
---
5+
6+
feat: Re-export the exports of the v18/v19/plugin from @module-federation/bridge-react in modernjs

packages/bridge/bridge-react/package.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"./plugin": {
4040
"types": "./dist/plugin.d.ts",
4141
"import": "./dist/plugin.es.js",
42-
"require": "./dist/plugin.es.js"
42+
"require": "./dist/plugin.cjs.js"
4343
},
4444
"./router-v5": {
4545
"types": "./dist/router-v5.d.ts",
@@ -81,7 +81,28 @@
8181
"typesVersions": {
8282
"*": {
8383
".": [
84-
"./dist/types/index.d.ts"
84+
"./dist/index.d.ts"
85+
],
86+
"v18": [
87+
"./dist/v18.d.ts"
88+
],
89+
"v19": [
90+
"./dist/v19.d.ts"
91+
],
92+
"router": [
93+
"./dist/router.d.ts"
94+
],
95+
"plugin": [
96+
"./dist/plugin.d.ts"
97+
],
98+
"router-v5": [
99+
"./dist/router-v5.d.ts"
100+
],
101+
"router-v6": [
102+
"./dist/router-v6.d.ts"
103+
],
104+
"router-v7": [
105+
"./dist/router-v7.d.ts"
85106
],
86107
"lazy-load-component-plugin": [
87108
"./dist/lazy-load-component-plugin.d.ts"

packages/modernjs/package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@
3131
"types": "./dist/types/react/index.d.ts",
3232
"default": "./dist/esm/react/index.js"
3333
},
34+
"./react-v18": {
35+
"types": "./dist/types/react/v18.d.ts",
36+
"default": "./dist/esm/react/v18.js"
37+
},
38+
"./react-v19": {
39+
"types": "./dist/types/react/v19.d.ts",
40+
"default": "./dist/esm/react/v19.js"
41+
},
42+
"./react-plugin": {
43+
"types": "./dist/types/react/plugin.d.ts",
44+
"default": "./dist/esm/react/plugin.js"
45+
},
3446
"./ssr-dev-plugin": {
3547
"types": "./dist/types/ssr-runtime/devPlugin.d.ts",
3648
"default": "./dist/esm/ssr-runtime/devPlugin.js"
@@ -84,6 +96,15 @@
8496
"react": [
8597
"./dist/types/react/index.d.ts"
8698
],
99+
"react-v18": [
100+
"./dist/types/react/v18.d.ts"
101+
],
102+
"react-v19": [
103+
"./dist/types/react/v19.d.ts"
104+
],
105+
"react-plugin": [
106+
"./dist/types/react/plugin.d.ts"
107+
],
87108
"config-plugin": [
88109
"./dist/types/cli/configPlugin.d.ts"
89110
],
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from '@module-federation/bridge-react/plugin';
2+
export { default } from '@module-federation/bridge-react/plugin';

packages/modernjs/src/react/v18.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '@module-federation/bridge-react/v18';

packages/modernjs/src/react/v19.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '@module-federation/bridge-react/v19';

0 commit comments

Comments
 (0)