@module-federation/bridge-react-webpack-plugin 0.0.0-feat-support-bridge-react-router-v7-20251015102312

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,588 @@
1
+ # @module-federation/bridge-react-webpack-plugin
2
+
3
+ ## 0.0.0-feat-support-bridge-react-router-v7-20251015102312
4
+
5
+ ### Minor Changes
6
+
7
+ - be6ccab: feat: Add React Router v7 Support to Module Federation Bridge
8
+
9
+ ### Patch Changes
10
+
11
+ - @module-federation/sdk@0.0.0-feat-support-bridge-react-router-v7-20251015102312
12
+
13
+ ## 0.20.0
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [37346d4]
18
+ - Updated dependencies [639a83b]
19
+ - @module-federation/sdk@0.20.0
20
+
21
+ ## 0.19.1
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+ - @module-federation/sdk@0.19.1
27
+
28
+ ## 0.19.0
29
+
30
+ ### Patch Changes
31
+
32
+ - @module-federation/sdk@0.19.0
33
+
34
+ ## 0.18.4
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [8061f8c]
39
+ - @module-federation/sdk@0.18.4
40
+
41
+ ## 0.18.3
42
+
43
+ ### Patch Changes
44
+
45
+ - @module-federation/sdk@0.18.3
46
+
47
+ ## 0.18.2
48
+
49
+ ### Patch Changes
50
+
51
+ - @module-federation/sdk@0.18.2
52
+
53
+ ## 0.18.1
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies [0bf3a3a]
58
+ - @module-federation/sdk@0.18.1
59
+
60
+ ## 0.18.0
61
+
62
+ ### Patch Changes
63
+
64
+ - Updated dependencies [f6381e6]
65
+ - @module-federation/sdk@0.18.0
66
+
67
+ ## 0.17.1
68
+
69
+ ### Patch Changes
70
+
71
+ - a7cf276: chore: upgrade NX to 21.2.3, Storybook to 9.0.9, and TypeScript to 5.8.3
72
+
73
+ - Upgraded NX from 21.0.3 to 21.2.3 with workspace configuration updates
74
+ - Migrated Storybook from 8.3.5 to 9.0.9 with updated configurations and automigrations
75
+ - Upgraded TypeScript from 5.7.3 to 5.8.3 with compatibility fixes
76
+ - Fixed package exports and type declaration paths across all packages
77
+ - Resolved module resolution issues and TypeScript compatibility problems
78
+ - Updated build configurations and dependencies to support latest versions
79
+
80
+ - Updated dependencies [a7cf276]
81
+ - @module-federation/sdk@0.17.1
82
+
83
+ ## 0.17.0
84
+
85
+ ### Patch Changes
86
+
87
+ - @module-federation/sdk@0.17.0
88
+
89
+ ## 0.16.0
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [1485fcf]
94
+ - @module-federation/sdk@0.16.0
95
+
96
+ ## 0.15.0
97
+
98
+ ### Patch Changes
99
+
100
+ - @module-federation/sdk@0.15.0
101
+
102
+ ## 0.14.3
103
+
104
+ ### Patch Changes
105
+
106
+ - @module-federation/sdk@0.14.3
107
+
108
+ ## 0.14.2
109
+
110
+ ### Patch Changes
111
+
112
+ - @module-federation/sdk@0.14.2
113
+
114
+ ## 0.14.1
115
+
116
+ ### Patch Changes
117
+
118
+ - @module-federation/sdk@0.14.1
119
+
120
+ ## 0.14.0
121
+
122
+ ### Patch Changes
123
+
124
+ - Updated dependencies [82b8cac]
125
+ - @module-federation/sdk@0.14.0
126
+
127
+ ## 0.13.1
128
+
129
+ ### Patch Changes
130
+
131
+ - @module-federation/sdk@0.13.1
132
+
133
+ ## 0.13.0
134
+
135
+ ### Patch Changes
136
+
137
+ - 38f324f: Disable live bindings on cjs builds of the runtime packages
138
+ - Updated dependencies [38f324f]
139
+ - @module-federation/sdk@0.13.0
140
+
141
+ ## 0.12.0
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies [c399b9a]
146
+ - Updated dependencies [ef96c4d]
147
+ - Updated dependencies [f4fb242]
148
+ - @module-federation/sdk@0.12.0
149
+
150
+ ## 0.11.4
151
+
152
+ ### Patch Changes
153
+
154
+ - Updated dependencies [64a2bc1]
155
+ - Updated dependencies [c14842f]
156
+ - @module-federation/sdk@0.11.4
157
+
158
+ ## 0.11.3
159
+
160
+ ### Patch Changes
161
+
162
+ - @module-federation/sdk@0.11.3
163
+
164
+ ## 0.11.2
165
+
166
+ ### Patch Changes
167
+
168
+ - Updated dependencies [047857b]
169
+ - @module-federation/sdk@0.11.2
170
+
171
+ ## 0.11.1
172
+
173
+ ### Patch Changes
174
+
175
+ - @module-federation/sdk@0.11.1
176
+
177
+ ## 0.11.0
178
+
179
+ ### Patch Changes
180
+
181
+ - Updated dependencies [fce107e]
182
+ - @module-federation/sdk@0.11.0
183
+
184
+ ## 0.10.0
185
+
186
+ ### Patch Changes
187
+
188
+ - Updated dependencies [0f71cbc]
189
+ - Updated dependencies [22fcccd]
190
+ - @module-federation/sdk@0.10.0
191
+
192
+ ## 0.9.1
193
+
194
+ ### Patch Changes
195
+
196
+ - Updated dependencies [35d925b]
197
+ - Updated dependencies [35d925b]
198
+ - Updated dependencies [8acd217]
199
+ - @module-federation/sdk@0.9.1
200
+
201
+ ## 0.9.0
202
+
203
+ ### Patch Changes
204
+
205
+ - @module-federation/sdk@0.9.0
206
+
207
+ ## 0.8.12
208
+
209
+ ### Patch Changes
210
+
211
+ - @module-federation/sdk@0.8.12
212
+
213
+ ## 0.8.11
214
+
215
+ ### Patch Changes
216
+
217
+ - @module-federation/sdk@0.8.11
218
+
219
+ ## 0.8.10
220
+
221
+ ### Patch Changes
222
+
223
+ - @module-federation/sdk@0.8.10
224
+
225
+ ## 0.8.9
226
+
227
+ ### Patch Changes
228
+
229
+ - @module-federation/sdk@0.8.9
230
+
231
+ ## 0.8.8
232
+
233
+ ### Patch Changes
234
+
235
+ - @module-federation/sdk@0.8.8
236
+
237
+ ## 0.8.7
238
+
239
+ ### Patch Changes
240
+
241
+ - Updated dependencies [835b09c]
242
+ - Updated dependencies [336f3d8]
243
+ - Updated dependencies [4fd33fb]
244
+ - @module-federation/sdk@0.8.7
245
+
246
+ ## 0.8.6
247
+
248
+ ### Patch Changes
249
+
250
+ - @module-federation/sdk@0.8.6
251
+
252
+ ## 0.8.5
253
+
254
+ ### Patch Changes
255
+
256
+ - @module-federation/sdk@0.8.5
257
+
258
+ ## 0.8.4
259
+
260
+ ### Patch Changes
261
+
262
+ - @module-federation/sdk@0.8.4
263
+
264
+ ## 0.8.3
265
+
266
+ ### Patch Changes
267
+
268
+ - Updated dependencies [8e172c8]
269
+ - @module-federation/sdk@0.8.3
270
+
271
+ ## 0.8.2
272
+
273
+ ### Patch Changes
274
+
275
+ - @module-federation/sdk@0.8.2
276
+
277
+ ## 0.8.1
278
+
279
+ ### Patch Changes
280
+
281
+ - @module-federation/sdk@0.8.1
282
+
283
+ ## 0.8.0
284
+
285
+ ### Patch Changes
286
+
287
+ - @module-federation/sdk@0.8.0
288
+
289
+ ## 0.7.7
290
+
291
+ ### Patch Changes
292
+
293
+ - @module-federation/sdk@0.7.7
294
+
295
+ ## 0.7.6
296
+
297
+ ### Patch Changes
298
+
299
+ - @module-federation/sdk@0.7.6
300
+
301
+ ## 0.7.5
302
+
303
+ ### Patch Changes
304
+
305
+ - 0309fb5: fix: wrap try catch with react-router-dom path resolve
306
+ - @module-federation/sdk@0.7.5
307
+
308
+ ## 0.7.4
309
+
310
+ ### Patch Changes
311
+
312
+ - @module-federation/sdk@0.7.4
313
+
314
+ ## 0.7.3
315
+
316
+ ### Patch Changes
317
+
318
+ - Updated dependencies [4ab9295]
319
+ - @module-federation/sdk@0.7.3
320
+
321
+ ## 0.7.2
322
+
323
+ ### Patch Changes
324
+
325
+ - @module-federation/sdk@0.7.2
326
+
327
+ ## 0.7.1
328
+
329
+ ### Patch Changes
330
+
331
+ - Updated dependencies [6db4c5f]
332
+ - @module-federation/sdk@0.7.1
333
+
334
+ ## 0.7.0
335
+
336
+ ### Minor Changes
337
+
338
+ - 3942740: add license information
339
+ - Updated dependencies [879ad87]
340
+ - Updated dependencies [4eb09e7]
341
+ - Updated dependencies [206b56d]
342
+ - @module-federation/sdk@0.7.0
343
+
344
+ ## 0.6.16
345
+
346
+ ### Patch Changes
347
+
348
+ - Updated dependencies [f779188]
349
+ - Updated dependencies [024df60]
350
+ - @module-federation/sdk@0.6.16
351
+
352
+ ## 0.6.15
353
+
354
+ ### Patch Changes
355
+
356
+ - @module-federation/sdk@0.6.15
357
+
358
+ ## 0.6.14
359
+
360
+ ### Patch Changes
361
+
362
+ - Updated dependencies [ad605d2]
363
+ - @module-federation/sdk@0.6.14
364
+
365
+ ## 0.6.13
366
+
367
+ ### Patch Changes
368
+
369
+ - @module-federation/sdk@0.6.13
370
+
371
+ ## 0.6.12
372
+
373
+ ### Patch Changes
374
+
375
+ - @module-federation/sdk@0.6.12
376
+
377
+ ## 0.6.11
378
+
379
+ ### Patch Changes
380
+
381
+ - Updated dependencies [d5a3072]
382
+ - @module-federation/sdk@0.6.11
383
+
384
+ ## 0.6.10
385
+
386
+ ### Patch Changes
387
+
388
+ - Updated dependencies [22a3b83]
389
+ - @module-federation/sdk@0.6.10
390
+
391
+ ## 0.6.9
392
+
393
+ ### Patch Changes
394
+
395
+ - @module-federation/sdk@0.6.9
396
+
397
+ ## 0.6.8
398
+
399
+ ### Patch Changes
400
+
401
+ - Updated dependencies [32db0ac]
402
+ - @module-federation/sdk@0.6.8
403
+
404
+ ## 0.6.7
405
+
406
+ ### Patch Changes
407
+
408
+ - Updated dependencies [9e32644]
409
+ - @module-federation/sdk@0.6.7
410
+
411
+ ## 0.6.6
412
+
413
+ ### Patch Changes
414
+
415
+ - @module-federation/sdk@0.6.6
416
+
417
+ ## 0.6.5
418
+
419
+ ### Patch Changes
420
+
421
+ - @module-federation/sdk@0.6.5
422
+
423
+ ## 0.6.4
424
+
425
+ ### Patch Changes
426
+
427
+ - d90295b: chore: adjust bridge router alias strategy to alias to router-v6 when not found react-router-dom in package.json
428
+ - @module-federation/sdk@0.6.4
429
+
430
+ ## 0.6.3
431
+
432
+ ### Patch Changes
433
+
434
+ - @module-federation/sdk@0.6.3
435
+
436
+ ## 0.6.2
437
+
438
+ ### Patch Changes
439
+
440
+ - @module-federation/sdk@0.6.2
441
+
442
+ ## 0.6.1
443
+
444
+ ### Patch Changes
445
+
446
+ - Updated dependencies [2855583]
447
+ - Updated dependencies [813680f]
448
+ - @module-federation/sdk@0.6.1
449
+
450
+ ## 0.6.0
451
+
452
+ ### Patch Changes
453
+
454
+ - Updated dependencies [1d9bb77]
455
+ - @module-federation/sdk@0.6.0
456
+
457
+ ## 0.5.2
458
+
459
+ ### Patch Changes
460
+
461
+ - Updated dependencies [b90fa7d]
462
+ - @module-federation/sdk@0.5.2
463
+
464
+ ## 0.5.1
465
+
466
+ ### Patch Changes
467
+
468
+ - 472e2cc: feat: enchance react-bridge react-router-dom alias according to origin react-router-dom version
469
+ - @module-federation/sdk@0.5.1
470
+
471
+ ## 0.5.0
472
+
473
+ ### Patch Changes
474
+
475
+ - 49d6135: feat(@module-federation/bridge): enhance Bridge capabilities and fix some issues
476
+ - Updated dependencies [8378a77]
477
+ - @module-federation/sdk@0.5.0
478
+
479
+ ## 0.4.0
480
+
481
+ ### Patch Changes
482
+
483
+ - Updated dependencies [a6e2bed]
484
+ - Updated dependencies [a6e2bed]
485
+ - @module-federation/sdk@0.4.0
486
+
487
+ ## 0.3.5
488
+
489
+ ### Patch Changes
490
+
491
+ - @module-federation/sdk@0.3.5
492
+
493
+ ## 0.3.4
494
+
495
+ ### Patch Changes
496
+
497
+ - @module-federation/sdk@0.3.4
498
+
499
+ ## 0.3.3
500
+
501
+ ### Patch Changes
502
+
503
+ - @module-federation/sdk@0.3.3
504
+
505
+ ## 0.3.2
506
+
507
+ ### Patch Changes
508
+
509
+ - @module-federation/sdk@0.3.2
510
+
511
+ ## 0.3.1
512
+
513
+ ### Patch Changes
514
+
515
+ - @module-federation/sdk@0.3.1
516
+
517
+ ## 0.3.0
518
+
519
+ ### Patch Changes
520
+
521
+ - Updated dependencies [fa37cc4]
522
+ - @module-federation/sdk@0.3.0
523
+
524
+ ## 0.2.8
525
+
526
+ ### Patch Changes
527
+
528
+ - @module-federation/sdk@0.2.8
529
+
530
+ ## 0.2.7
531
+
532
+ ### Patch Changes
533
+
534
+ - Updated dependencies [b00ef13]
535
+ - @module-federation/sdk@0.2.7
536
+
537
+ ## 0.2.6
538
+
539
+ ### Patch Changes
540
+
541
+ - Updated dependencies [91bf689]
542
+ - @module-federation/sdk@0.2.6
543
+
544
+ ## 0.2.5
545
+
546
+ ### Patch Changes
547
+
548
+ - Updated dependencies [8cce571]
549
+ - @module-federation/sdk@0.2.5
550
+
551
+ ## 0.2.4
552
+
553
+ ### Patch Changes
554
+
555
+ - Updated dependencies [09b792d]
556
+ - Updated dependencies [09b792d]
557
+ - @module-federation/sdk@0.2.4
558
+
559
+ ## 0.2.3
560
+
561
+ ### Patch Changes
562
+
563
+ - Updated dependencies [32f26af]
564
+ - Updated dependencies [32f26af]
565
+ - @module-federation/sdk@0.2.3
566
+
567
+ ## 0.2.2
568
+
569
+ ### Patch Changes
570
+
571
+ - @module-federation/sdk@0.2.2
572
+
573
+ ## 0.2.1
574
+
575
+ ### Patch Changes
576
+
577
+ - Updated dependencies [88445e7]
578
+ - @module-federation/sdk@0.2.1
579
+
580
+ ## 0.2.0
581
+
582
+ ### Minor Changes
583
+
584
+ - d2ab821: feat(bridge): Supports exporting and loading of application-level modules (with routing), currently supports react and vue3
585
+
586
+ ### Patch Changes
587
+
588
+ - @module-federation/sdk@0.2.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 ScriptedAlchemy LLC (Zack Jackson) Zhou Shaw (zhouxiao)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,131 @@
1
+ # React Bridge
2
+
3
+ React bridge is used to load the routing module in mf, so that the routing module can work properly with the host environment.
4
+
5
+ > When to use
6
+
7
+ - Load the route module
8
+ - Load across the front end framework
9
+
10
+ ## How to use
11
+
12
+ # 1. Install the react bridge library
13
+
14
+ ```bash
15
+ pnpm add @module-federation/bridge-react
16
+ ```
17
+
18
+ # 2. Configure the react bridge library
19
+
20
+ > Use createBridgeComponent create component provider
21
+
22
+ ```jsx
23
+ // ./src/index.tsx
24
+ import { createBridgeComponent } from '@module-federation/bridge-react';
25
+
26
+ function App() {
27
+ return ( <BrowserRouter basename="/">
28
+ <Routes>
29
+ <Route path="/" Component={()=> <div>Home page</div>}>
30
+ <Route path="/detail" Component={()=> <div>Detail page</div>}>
31
+ </Routes>
32
+ </BrowserRouter>)
33
+ }
34
+
35
+ export default createBridgeComponent({
36
+ rootComponent: App
37
+ });
38
+ ```
39
+
40
+ > set alias to proxy
41
+
42
+ ```js
43
+ //rsbuild.config.ts
44
+ export default defineConfig({
45
+ source: {
46
+ alias: {
47
+ 'react-router-dom$': path.resolve(
48
+ __dirname,
49
+ 'node_modules/@module-federation/bridge-react/dist/router.es.js',
50
+ ),
51
+ },
52
+ },
53
+ server: {
54
+ port: 2001,
55
+ host: 'localhost',
56
+ },
57
+ dev: {
58
+ assetPrefix: 'http://localhost:2001',
59
+ },
60
+ tools: {
61
+ rspack: (config, { appendPlugins }) => {
62
+ delete config.optimization?.splitChunks;
63
+ config.output!.uniqueName = 'remote1';
64
+ appendPlugins([
65
+ new ModuleFederationPlugin({
66
+ name: 'remote1',
67
+ exposes: {
68
+ './export-app': './src/index.tsx',
69
+ }
70
+ }),
71
+ ]);
72
+ },
73
+ },
74
+ });
75
+ ```
76
+
77
+ # 3. Load the module with routing
78
+
79
+ ```js
80
+ //rsbuild.config.ts
81
+ export default defineConfig({
82
+ tools: {
83
+ rspack: (config, { appendPlugins }) => {
84
+ config.output!.uniqueName = 'host';
85
+ appendPlugins([
86
+ new ModuleFederationPlugin({
87
+ name: 'host',
88
+ remotes: {
89
+ remote1: 'remote1@http://localhost:2001/mf-manifest.json',
90
+ },
91
+ }),
92
+ ]);
93
+ },
94
+ },
95
+ });
96
+ ```
97
+
98
+ > Use the module
99
+
100
+ ```jsx
101
+ // ./src/index.tsx
102
+ import { createBridgeComponent } from '@module-federation/bridge-react';
103
+
104
+ const Remote1 = createBridgeComponent(()=> import('remote1/export-app'));
105
+
106
+ function App() {
107
+ return ( <BrowserRouter basename="/">
108
+ <ul>
109
+ <li>
110
+ <Link to="/">
111
+ Home
112
+ </Link>
113
+ </li>
114
+ <li>
115
+ <Link to="/remote1">
116
+ Remote1
117
+ </Link>
118
+ </li>
119
+ </ul>
120
+ <Routes>
121
+ <Route path="/" Component={()=> <div>Home page</div>}>
122
+ <Route path="/remote1" Component={()=> <Remote1 />}>
123
+ </Routes>
124
+ </BrowserRouter>)
125
+ }
126
+
127
+ const root = ReactDOM.createRoot(document.getElementById('root')!);
128
+ root.render(
129
+ <App />
130
+ );
131
+ ```