@module-federation/bridge-react-webpack-plugin 0.0.0-fix-lazy-comile-20250925082726

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,577 @@
1
+ # @module-federation/bridge-react-webpack-plugin
2
+
3
+ ## 0.0.0-fix-lazy-comile-20250925082726
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [37346d4]
8
+ - @module-federation/sdk@0.0.0-fix-lazy-comile-20250925082726
9
+
10
+ ## 0.19.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @module-federation/sdk@0.19.1
16
+
17
+ ## 0.19.0
18
+
19
+ ### Patch Changes
20
+
21
+ - @module-federation/sdk@0.19.0
22
+
23
+ ## 0.18.4
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [8061f8c]
28
+ - @module-federation/sdk@0.18.4
29
+
30
+ ## 0.18.3
31
+
32
+ ### Patch Changes
33
+
34
+ - @module-federation/sdk@0.18.3
35
+
36
+ ## 0.18.2
37
+
38
+ ### Patch Changes
39
+
40
+ - @module-federation/sdk@0.18.2
41
+
42
+ ## 0.18.1
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [0bf3a3a]
47
+ - @module-federation/sdk@0.18.1
48
+
49
+ ## 0.18.0
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [f6381e6]
54
+ - @module-federation/sdk@0.18.0
55
+
56
+ ## 0.17.1
57
+
58
+ ### Patch Changes
59
+
60
+ - a7cf276: chore: upgrade NX to 21.2.3, Storybook to 9.0.9, and TypeScript to 5.8.3
61
+
62
+ - Upgraded NX from 21.0.3 to 21.2.3 with workspace configuration updates
63
+ - Migrated Storybook from 8.3.5 to 9.0.9 with updated configurations and automigrations
64
+ - Upgraded TypeScript from 5.7.3 to 5.8.3 with compatibility fixes
65
+ - Fixed package exports and type declaration paths across all packages
66
+ - Resolved module resolution issues and TypeScript compatibility problems
67
+ - Updated build configurations and dependencies to support latest versions
68
+
69
+ - Updated dependencies [a7cf276]
70
+ - @module-federation/sdk@0.17.1
71
+
72
+ ## 0.17.0
73
+
74
+ ### Patch Changes
75
+
76
+ - @module-federation/sdk@0.17.0
77
+
78
+ ## 0.16.0
79
+
80
+ ### Patch Changes
81
+
82
+ - Updated dependencies [1485fcf]
83
+ - @module-federation/sdk@0.16.0
84
+
85
+ ## 0.15.0
86
+
87
+ ### Patch Changes
88
+
89
+ - @module-federation/sdk@0.15.0
90
+
91
+ ## 0.14.3
92
+
93
+ ### Patch Changes
94
+
95
+ - @module-federation/sdk@0.14.3
96
+
97
+ ## 0.14.2
98
+
99
+ ### Patch Changes
100
+
101
+ - @module-federation/sdk@0.14.2
102
+
103
+ ## 0.14.1
104
+
105
+ ### Patch Changes
106
+
107
+ - @module-federation/sdk@0.14.1
108
+
109
+ ## 0.14.0
110
+
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [82b8cac]
114
+ - @module-federation/sdk@0.14.0
115
+
116
+ ## 0.13.1
117
+
118
+ ### Patch Changes
119
+
120
+ - @module-federation/sdk@0.13.1
121
+
122
+ ## 0.13.0
123
+
124
+ ### Patch Changes
125
+
126
+ - 38f324f: Disable live bindings on cjs builds of the runtime packages
127
+ - Updated dependencies [38f324f]
128
+ - @module-federation/sdk@0.13.0
129
+
130
+ ## 0.12.0
131
+
132
+ ### Patch Changes
133
+
134
+ - Updated dependencies [c399b9a]
135
+ - Updated dependencies [ef96c4d]
136
+ - Updated dependencies [f4fb242]
137
+ - @module-federation/sdk@0.12.0
138
+
139
+ ## 0.11.4
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [64a2bc1]
144
+ - Updated dependencies [c14842f]
145
+ - @module-federation/sdk@0.11.4
146
+
147
+ ## 0.11.3
148
+
149
+ ### Patch Changes
150
+
151
+ - @module-federation/sdk@0.11.3
152
+
153
+ ## 0.11.2
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies [047857b]
158
+ - @module-federation/sdk@0.11.2
159
+
160
+ ## 0.11.1
161
+
162
+ ### Patch Changes
163
+
164
+ - @module-federation/sdk@0.11.1
165
+
166
+ ## 0.11.0
167
+
168
+ ### Patch Changes
169
+
170
+ - Updated dependencies [fce107e]
171
+ - @module-federation/sdk@0.11.0
172
+
173
+ ## 0.10.0
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies [0f71cbc]
178
+ - Updated dependencies [22fcccd]
179
+ - @module-federation/sdk@0.10.0
180
+
181
+ ## 0.9.1
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies [35d925b]
186
+ - Updated dependencies [35d925b]
187
+ - Updated dependencies [8acd217]
188
+ - @module-federation/sdk@0.9.1
189
+
190
+ ## 0.9.0
191
+
192
+ ### Patch Changes
193
+
194
+ - @module-federation/sdk@0.9.0
195
+
196
+ ## 0.8.12
197
+
198
+ ### Patch Changes
199
+
200
+ - @module-federation/sdk@0.8.12
201
+
202
+ ## 0.8.11
203
+
204
+ ### Patch Changes
205
+
206
+ - @module-federation/sdk@0.8.11
207
+
208
+ ## 0.8.10
209
+
210
+ ### Patch Changes
211
+
212
+ - @module-federation/sdk@0.8.10
213
+
214
+ ## 0.8.9
215
+
216
+ ### Patch Changes
217
+
218
+ - @module-federation/sdk@0.8.9
219
+
220
+ ## 0.8.8
221
+
222
+ ### Patch Changes
223
+
224
+ - @module-federation/sdk@0.8.8
225
+
226
+ ## 0.8.7
227
+
228
+ ### Patch Changes
229
+
230
+ - Updated dependencies [835b09c]
231
+ - Updated dependencies [336f3d8]
232
+ - Updated dependencies [4fd33fb]
233
+ - @module-federation/sdk@0.8.7
234
+
235
+ ## 0.8.6
236
+
237
+ ### Patch Changes
238
+
239
+ - @module-federation/sdk@0.8.6
240
+
241
+ ## 0.8.5
242
+
243
+ ### Patch Changes
244
+
245
+ - @module-federation/sdk@0.8.5
246
+
247
+ ## 0.8.4
248
+
249
+ ### Patch Changes
250
+
251
+ - @module-federation/sdk@0.8.4
252
+
253
+ ## 0.8.3
254
+
255
+ ### Patch Changes
256
+
257
+ - Updated dependencies [8e172c8]
258
+ - @module-federation/sdk@0.8.3
259
+
260
+ ## 0.8.2
261
+
262
+ ### Patch Changes
263
+
264
+ - @module-federation/sdk@0.8.2
265
+
266
+ ## 0.8.1
267
+
268
+ ### Patch Changes
269
+
270
+ - @module-federation/sdk@0.8.1
271
+
272
+ ## 0.8.0
273
+
274
+ ### Patch Changes
275
+
276
+ - @module-federation/sdk@0.8.0
277
+
278
+ ## 0.7.7
279
+
280
+ ### Patch Changes
281
+
282
+ - @module-federation/sdk@0.7.7
283
+
284
+ ## 0.7.6
285
+
286
+ ### Patch Changes
287
+
288
+ - @module-federation/sdk@0.7.6
289
+
290
+ ## 0.7.5
291
+
292
+ ### Patch Changes
293
+
294
+ - 0309fb5: fix: wrap try catch with react-router-dom path resolve
295
+ - @module-federation/sdk@0.7.5
296
+
297
+ ## 0.7.4
298
+
299
+ ### Patch Changes
300
+
301
+ - @module-federation/sdk@0.7.4
302
+
303
+ ## 0.7.3
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies [4ab9295]
308
+ - @module-federation/sdk@0.7.3
309
+
310
+ ## 0.7.2
311
+
312
+ ### Patch Changes
313
+
314
+ - @module-federation/sdk@0.7.2
315
+
316
+ ## 0.7.1
317
+
318
+ ### Patch Changes
319
+
320
+ - Updated dependencies [6db4c5f]
321
+ - @module-federation/sdk@0.7.1
322
+
323
+ ## 0.7.0
324
+
325
+ ### Minor Changes
326
+
327
+ - 3942740: add license information
328
+ - Updated dependencies [879ad87]
329
+ - Updated dependencies [4eb09e7]
330
+ - Updated dependencies [206b56d]
331
+ - @module-federation/sdk@0.7.0
332
+
333
+ ## 0.6.16
334
+
335
+ ### Patch Changes
336
+
337
+ - Updated dependencies [f779188]
338
+ - Updated dependencies [024df60]
339
+ - @module-federation/sdk@0.6.16
340
+
341
+ ## 0.6.15
342
+
343
+ ### Patch Changes
344
+
345
+ - @module-federation/sdk@0.6.15
346
+
347
+ ## 0.6.14
348
+
349
+ ### Patch Changes
350
+
351
+ - Updated dependencies [ad605d2]
352
+ - @module-federation/sdk@0.6.14
353
+
354
+ ## 0.6.13
355
+
356
+ ### Patch Changes
357
+
358
+ - @module-federation/sdk@0.6.13
359
+
360
+ ## 0.6.12
361
+
362
+ ### Patch Changes
363
+
364
+ - @module-federation/sdk@0.6.12
365
+
366
+ ## 0.6.11
367
+
368
+ ### Patch Changes
369
+
370
+ - Updated dependencies [d5a3072]
371
+ - @module-federation/sdk@0.6.11
372
+
373
+ ## 0.6.10
374
+
375
+ ### Patch Changes
376
+
377
+ - Updated dependencies [22a3b83]
378
+ - @module-federation/sdk@0.6.10
379
+
380
+ ## 0.6.9
381
+
382
+ ### Patch Changes
383
+
384
+ - @module-federation/sdk@0.6.9
385
+
386
+ ## 0.6.8
387
+
388
+ ### Patch Changes
389
+
390
+ - Updated dependencies [32db0ac]
391
+ - @module-federation/sdk@0.6.8
392
+
393
+ ## 0.6.7
394
+
395
+ ### Patch Changes
396
+
397
+ - Updated dependencies [9e32644]
398
+ - @module-federation/sdk@0.6.7
399
+
400
+ ## 0.6.6
401
+
402
+ ### Patch Changes
403
+
404
+ - @module-federation/sdk@0.6.6
405
+
406
+ ## 0.6.5
407
+
408
+ ### Patch Changes
409
+
410
+ - @module-federation/sdk@0.6.5
411
+
412
+ ## 0.6.4
413
+
414
+ ### Patch Changes
415
+
416
+ - d90295b: chore: adjust bridge router alias strategy to alias to router-v6 when not found react-router-dom in package.json
417
+ - @module-federation/sdk@0.6.4
418
+
419
+ ## 0.6.3
420
+
421
+ ### Patch Changes
422
+
423
+ - @module-federation/sdk@0.6.3
424
+
425
+ ## 0.6.2
426
+
427
+ ### Patch Changes
428
+
429
+ - @module-federation/sdk@0.6.2
430
+
431
+ ## 0.6.1
432
+
433
+ ### Patch Changes
434
+
435
+ - Updated dependencies [2855583]
436
+ - Updated dependencies [813680f]
437
+ - @module-federation/sdk@0.6.1
438
+
439
+ ## 0.6.0
440
+
441
+ ### Patch Changes
442
+
443
+ - Updated dependencies [1d9bb77]
444
+ - @module-federation/sdk@0.6.0
445
+
446
+ ## 0.5.2
447
+
448
+ ### Patch Changes
449
+
450
+ - Updated dependencies [b90fa7d]
451
+ - @module-federation/sdk@0.5.2
452
+
453
+ ## 0.5.1
454
+
455
+ ### Patch Changes
456
+
457
+ - 472e2cc: feat: enchance react-bridge react-router-dom alias according to origin react-router-dom version
458
+ - @module-federation/sdk@0.5.1
459
+
460
+ ## 0.5.0
461
+
462
+ ### Patch Changes
463
+
464
+ - 49d6135: feat(@module-federation/bridge): enhance Bridge capabilities and fix some issues
465
+ - Updated dependencies [8378a77]
466
+ - @module-federation/sdk@0.5.0
467
+
468
+ ## 0.4.0
469
+
470
+ ### Patch Changes
471
+
472
+ - Updated dependencies [a6e2bed]
473
+ - Updated dependencies [a6e2bed]
474
+ - @module-federation/sdk@0.4.0
475
+
476
+ ## 0.3.5
477
+
478
+ ### Patch Changes
479
+
480
+ - @module-federation/sdk@0.3.5
481
+
482
+ ## 0.3.4
483
+
484
+ ### Patch Changes
485
+
486
+ - @module-federation/sdk@0.3.4
487
+
488
+ ## 0.3.3
489
+
490
+ ### Patch Changes
491
+
492
+ - @module-federation/sdk@0.3.3
493
+
494
+ ## 0.3.2
495
+
496
+ ### Patch Changes
497
+
498
+ - @module-federation/sdk@0.3.2
499
+
500
+ ## 0.3.1
501
+
502
+ ### Patch Changes
503
+
504
+ - @module-federation/sdk@0.3.1
505
+
506
+ ## 0.3.0
507
+
508
+ ### Patch Changes
509
+
510
+ - Updated dependencies [fa37cc4]
511
+ - @module-federation/sdk@0.3.0
512
+
513
+ ## 0.2.8
514
+
515
+ ### Patch Changes
516
+
517
+ - @module-federation/sdk@0.2.8
518
+
519
+ ## 0.2.7
520
+
521
+ ### Patch Changes
522
+
523
+ - Updated dependencies [b00ef13]
524
+ - @module-federation/sdk@0.2.7
525
+
526
+ ## 0.2.6
527
+
528
+ ### Patch Changes
529
+
530
+ - Updated dependencies [91bf689]
531
+ - @module-federation/sdk@0.2.6
532
+
533
+ ## 0.2.5
534
+
535
+ ### Patch Changes
536
+
537
+ - Updated dependencies [8cce571]
538
+ - @module-federation/sdk@0.2.5
539
+
540
+ ## 0.2.4
541
+
542
+ ### Patch Changes
543
+
544
+ - Updated dependencies [09b792d]
545
+ - Updated dependencies [09b792d]
546
+ - @module-federation/sdk@0.2.4
547
+
548
+ ## 0.2.3
549
+
550
+ ### Patch Changes
551
+
552
+ - Updated dependencies [32f26af]
553
+ - Updated dependencies [32f26af]
554
+ - @module-federation/sdk@0.2.3
555
+
556
+ ## 0.2.2
557
+
558
+ ### Patch Changes
559
+
560
+ - @module-federation/sdk@0.2.2
561
+
562
+ ## 0.2.1
563
+
564
+ ### Patch Changes
565
+
566
+ - Updated dependencies [88445e7]
567
+ - @module-federation/sdk@0.2.1
568
+
569
+ ## 0.2.0
570
+
571
+ ### Minor Changes
572
+
573
+ - d2ab821: feat(bridge): Supports exporting and loading of application-level modules (with routing), currently supports react and vue3
574
+
575
+ ### Patch Changes
576
+
577
+ - @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
+ ```