@module-federation/nextjs-mf 6.5.0 → 6.5.2-beta.0

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +280 -0
  2. package/README.md +3 -2
  3. package/package.json +5 -6
  4. package/src/default-delegate.d.ts +2 -0
  5. package/src/default-delegate.js +17 -0
  6. package/src/default-delegate.js.map +1 -0
  7. package/src/delegate-hoist-container.js +2 -0
  8. package/src/delegate-hoist-container.js.map +1 -0
  9. package/src/federation-noop.d.ts +1 -0
  10. package/src/federation-noop.js +3 -0
  11. package/src/federation-noop.js.map +1 -0
  12. package/src/index.d.ts +1 -1
  13. package/src/index.js +6 -5
  14. package/src/index.js.map +1 -1
  15. package/src/internal-delegate-hoist.js +1 -0
  16. package/src/internal-delegate-hoist.js.map +1 -1
  17. package/src/internal.d.ts +38 -9
  18. package/src/internal.js +164 -251
  19. package/src/internal.js.map +1 -1
  20. package/src/loaders/delegateLoader.js +2 -4
  21. package/src/loaders/delegateLoader.js.map +1 -1
  22. package/src/loaders/inject-hoist.d.ts +3 -0
  23. package/src/loaders/inject-hoist.js +8 -0
  24. package/src/loaders/inject-hoist.js.map +1 -0
  25. package/src/loaders/nextPageMapLoader.js +0 -2
  26. package/src/loaders/nextPageMapLoader.js.map +1 -1
  27. package/src/loaders/patchDefaultSharedLoader.d.ts +0 -5
  28. package/src/loaders/patchDefaultSharedLoader.js +20 -16
  29. package/src/loaders/patchDefaultSharedLoader.js.map +1 -1
  30. package/src/plugins/CopyFederationPlugin.d.ts +7 -0
  31. package/src/plugins/CopyFederationPlugin.js +48 -0
  32. package/src/plugins/CopyFederationPlugin.js.map +1 -0
  33. package/src/plugins/JsonpChunkLoading.d.ts +7 -0
  34. package/src/plugins/JsonpChunkLoading.js +41 -0
  35. package/src/plugins/JsonpChunkLoading.js.map +1 -0
  36. package/src/plugins/NextFederationPlugin/apply-client-plugins.d.ts +24 -0
  37. package/src/plugins/NextFederationPlugin/apply-client-plugins.js +78 -0
  38. package/src/plugins/NextFederationPlugin/apply-client-plugins.js.map +1 -0
  39. package/src/plugins/NextFederationPlugin/apply-server-plugins.d.ts +53 -0
  40. package/src/plugins/NextFederationPlugin/apply-server-plugins.js +159 -0
  41. package/src/plugins/NextFederationPlugin/apply-server-plugins.js.map +1 -0
  42. package/src/plugins/NextFederationPlugin/index.d.ts +18 -0
  43. package/src/plugins/NextFederationPlugin/index.js +136 -0
  44. package/src/plugins/NextFederationPlugin/index.js.map +1 -0
  45. package/src/plugins/NextFederationPlugin/next-fragments.d.ts +33 -0
  46. package/src/plugins/NextFederationPlugin/next-fragments.js +79 -0
  47. package/src/plugins/NextFederationPlugin/next-fragments.js.map +1 -0
  48. package/src/plugins/NextFederationPlugin/regex-equal.d.ts +14 -0
  49. package/src/plugins/NextFederationPlugin/regex-equal.js +25 -0
  50. package/src/plugins/NextFederationPlugin/regex-equal.js.map +1 -0
  51. package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.d.ts +1 -0
  52. package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.js +20 -0
  53. package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.js.map +1 -0
  54. package/src/plugins/NextFederationPlugin/set-options.d.ts +20 -0
  55. package/src/plugins/NextFederationPlugin/set-options.js +33 -0
  56. package/src/plugins/NextFederationPlugin/set-options.js.map +1 -0
  57. package/src/plugins/NextFederationPlugin/validate-options.d.ts +26 -0
  58. package/src/plugins/NextFederationPlugin/validate-options.js +46 -0
  59. package/src/plugins/NextFederationPlugin/validate-options.js.map +1 -0
  60. package/src/plugins/container/InvertedContainerPlugin.d.ts +30 -0
  61. package/src/plugins/container/InvertedContainerPlugin.js +167 -0
  62. package/src/plugins/container/InvertedContainerPlugin.js.map +1 -0
  63. package/src/plugins/container/InvertedContainerRuntimeModule.d.ts +45 -0
  64. package/src/plugins/container/InvertedContainerRuntimeModule.js +521 -0
  65. package/src/plugins/container/InvertedContainerRuntimeModule.js.map +1 -0
  66. package/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.d.ts +17 -0
  67. package/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.js +91 -0
  68. package/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.js.map +1 -0
  69. package/src/plugins/container/custom-jsonp.d.ts +2 -0
  70. package/src/plugins/container/custom-jsonp.js +122 -0
  71. package/src/plugins/container/custom-jsonp.js.map +1 -0
  72. package/src/plugins/container/types.d.ts +2 -0
  73. package/src/plugins/container/types.js +3 -0
  74. package/src/plugins/container/types.js.map +1 -0
  75. package/utils/Template.d.ts +1 -1
  76. package/utils/Template.js +1 -1
  77. package/utils/Template.js.map +1 -1
  78. package/utils/build-utils.d.ts +0 -8
  79. package/utils/build-utils.js +1 -228
  80. package/utils/build-utils.js.map +1 -1
  81. package/utils/flushedChunks.d.ts +7 -0
  82. package/utils/flushedChunks.js +37 -0
  83. package/utils/flushedChunks.js.map +1 -0
  84. package/utils/index.d.ts +4 -12
  85. package/utils/index.js +7 -35
  86. package/utils/index.js.map +1 -1
  87. package/src/include-defaults.js +0 -16
  88. package/src/include-defaults.js.map +0 -1
  89. package/src/loaders/async-boundary-loader.d.ts +0 -2
  90. package/src/loaders/async-boundary-loader.js +0 -69
  91. package/src/loaders/async-boundary-loader.js.map +0 -1
  92. package/src/plugins/ChildFederationPlugin.d.ts +0 -11
  93. package/src/plugins/ChildFederationPlugin.js +0 -299
  94. package/src/plugins/ChildFederationPlugin.js.map +0 -1
  95. package/src/plugins/ModuleFederationPlugin.d.ts +0 -7
  96. package/src/plugins/ModuleFederationPlugin.js +0 -50
  97. package/src/plugins/ModuleFederationPlugin.js.map +0 -1
  98. package/src/plugins/NextFederationPlugin.d.ts +0 -9
  99. package/src/plugins/NextFederationPlugin.js +0 -234
  100. package/src/plugins/NextFederationPlugin.js.map +0 -1
  101. package/src/plugins/RemoveRRRuntimePlugin.d.ts +0 -5
  102. package/src/plugins/RemoveRRRuntimePlugin.js +0 -40
  103. package/src/plugins/RemoveRRRuntimePlugin.js.map +0 -1
  104. /package/src/{include-defaults.d.ts → delegate-hoist-container.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,286 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [6.5.2-beta.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.5.2-rc1.0...nextjs-mf-6.5.2-beta.0) (2023-05-26)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * Improve chunk correlation ([#936](https://github.com/module-federation/nextjs-mf/issues/936)) ([4dad1eb](https://github.com/module-federation/nextjs-mf/commit/4dad1eb370feacd6ecb4c1726c435d5c579f424d))
11
+ * remove default props deprecation on flush chunks ([103fa91](https://github.com/module-federation/nextjs-mf/commit/103fa910d39e25d283076755a2eedf4e926ba242))
12
+
13
+
14
+ ### Features
15
+
16
+ * support custom distDir ([3d8d540](https://github.com/module-federation/nextjs-mf/commit/3d8d5408f73be9b8798f02fbd2382457510fdc3f))
17
+
18
+
19
+
20
+ ## [6.5.2-rc1.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.5.2-rc.0...nextjs-mf-6.5.2-rc1.0) (2023-05-25)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * Improved Entrypoint Module Detection and Refactoring ([#932](https://github.com/module-federation/nextjs-mf/issues/932)) ([d09e841](https://github.com/module-federation/nextjs-mf/commit/d09e841fb2e01300e61c046e18b9d02842920b4a))
26
+ * remove specific module type from package ([ad8caf7](https://github.com/module-federation/nextjs-mf/commit/ad8caf7df575a67a866e882e515d9a4e249f5ad8))
27
+
28
+
29
+
30
+ ## [6.5.2-rc.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.5.1...nextjs-mf-6.5.2-rc.0) (2023-05-23)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * chunk and module duplications ([#885](https://github.com/module-federation/nextjs-mf/issues/885)) ([199e6b9](https://github.com/module-federation/nextjs-mf/commit/199e6b9937f4a2ca6caedb3ae4767342de463cb6))
36
+ * client prod build issues ([#899](https://github.com/module-federation/nextjs-mf/issues/899)) ([470d7ad](https://github.com/module-federation/nextjs-mf/commit/470d7ad408ae8d64dbccc5a9528eaa2ed60fa2ca))
37
+ * deprecation warnings about chunkGraph ([9af484d](https://github.com/module-federation/nextjs-mf/commit/9af484dedba44b346d25ac5cdd10292ad018143d))
38
+ * externalization and missing runtime chunks ([#887](https://github.com/module-federation/nextjs-mf/issues/887)) ([c79cd62](https://github.com/module-federation/nextjs-mf/commit/c79cd6226d3134f1d6294cd8eba40c8c33af5cb5))
39
+ * missing chunk hashes on exposed modules ([#893](https://github.com/module-federation/nextjs-mf/issues/893)) ([cfa43f5](https://github.com/module-federation/nextjs-mf/commit/cfa43f506999d5ce3ab6afeea513d50d85f7886e))
40
+
41
+
42
+
43
+ ## [6.4.1-rc.2](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-rc.1...nextjs-mf-6.4.1-rc.2) (2023-05-17)
44
+
45
+
46
+
47
+ ## [6.4.1-rc.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-rc.0...nextjs-mf-6.4.1-rc.1) (2023-05-17)
48
+
49
+
50
+ ### Bug Fixes
51
+
52
+ * **chunk-module-duplication:** prevent runtime reset and share scope loss ([14bfc38](https://github.com/module-federation/nextjs-mf/commit/14bfc38515a4da3be7321d4b6d876905d45ad20b))
53
+
54
+
55
+
56
+ ## [6.4.1-rc.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.7...nextjs-mf-6.4.1-rc.0) (2023-05-16)
57
+
58
+
59
+ ### Bug Fixes
60
+
61
+ * Improved Share Scope Properties and Fixed Production Build Issues ([#884](https://github.com/module-federation/nextjs-mf/issues/884)) ([de7b2ce](https://github.com/module-federation/nextjs-mf/commit/de7b2cec7518f6b069818a511275e359c616bb73))
62
+ * remove old files ([fa281ec](https://github.com/module-federation/nextjs-mf/commit/fa281ecf0a5486bcf995f548deaef993f437c068))
63
+
64
+
65
+ ### Features
66
+
67
+ * remove entry injection ([4e6981f](https://github.com/module-federation/nextjs-mf/commit/4e6981f8d8a312ae383b1c2cd337882b268e2b9b))
68
+
69
+
70
+
71
+ ## [6.4.1-beta.7](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.6...nextjs-mf-6.4.1-beta.7) (2023-05-16)
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * ensure eager modules always exist in host (inject dependent modules somewhere in build pipeline) ([12bb896](https://github.com/module-federation/nextjs-mf/commit/12bb896d37324b4f3d0d59da04463b1d04428a01))
77
+
78
+
79
+
80
+ ## [6.4.1-beta.6](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.5...nextjs-mf-6.4.1-beta.6) (2023-05-15)
81
+
82
+
83
+ ### Features
84
+
85
+ * Quantum Modules ([#872](https://github.com/module-federation/nextjs-mf/issues/872)) ([2991039](https://github.com/module-federation/nextjs-mf/commit/299103932b4e0aa6d8017be588ffa5272f519260))
86
+
87
+
88
+
89
+ ## [6.4.1-beta.5](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.4...nextjs-mf-6.4.1-beta.5) (2023-05-13)
90
+
91
+
92
+ ### Bug Fixes
93
+
94
+ * remove debugging runtime variable ([d15dc2d](https://github.com/module-federation/nextjs-mf/commit/d15dc2dc6f6297532d89295690c6f561fee7955f))
95
+
96
+
97
+
98
+ ## [6.4.1-beta.4](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.3...nextjs-mf-6.4.1-beta.4) (2023-05-13)
99
+
100
+
101
+ ### Bug Fixes
102
+
103
+ * add warning on auto page stitch ([2f068cf](https://github.com/module-federation/nextjs-mf/commit/2f068cfd71f0aad12285b9ab4cfbd515f399211c))
104
+ * remove commented out code from InvertedContainerPlugin.ts ([7d52961](https://github.com/module-federation/nextjs-mf/commit/7d529612869f061733d7d87c9770036b7c2b0bbb))
105
+ * resolve backmerge issues with build ([2ad095c](https://github.com/module-federation/nextjs-mf/commit/2ad095cc3198dfd153644cee5fb4f37fa3bf6f03))
106
+
107
+
108
+ ### Features
109
+
110
+ * [7] Async boundary runtime server ([#851](https://github.com/module-federation/nextjs-mf/issues/851)) ([7fa792a](https://github.com/module-federation/nextjs-mf/commit/7fa792a4b518cd007b5ac41db225e20521063e73)), closes [#864](https://github.com/module-federation/nextjs-mf/issues/864)
111
+ * [v7] Async boundary runtime ([#835](https://github.com/module-federation/nextjs-mf/issues/835)) ([840e3b5](https://github.com/module-federation/nextjs-mf/commit/840e3b5bddfbb99b5d8d0f5f24bf5e179e8b52ad)), closes [#851](https://github.com/module-federation/nextjs-mf/issues/851) [#864](https://github.com/module-federation/nextjs-mf/issues/864)
112
+ * enable eager sharing ([b1e4418](https://github.com/module-federation/nextjs-mf/commit/b1e4418304afd30c5f4719469db50c17c279a021))
113
+
114
+
115
+ ### BREAKING CHANGES
116
+
117
+ * automaticAsyncBoundary option has been removed
118
+
119
+ * fix: exclude specific pages from page map automatically
120
+
121
+ * refactor: conslidate codebase
122
+
123
+ * fix: improve hot reload share recovery
124
+
125
+ * refactor: remove server jsonp template
126
+
127
+ * chore: remove dead code from runtime modules
128
+
129
+ * fix: clean up jsonp getCustomJsonpCode
130
+
131
+ getting chunk loading global from compiler output options
132
+
133
+ * feat: adding cleanInitArrays runtime helper
134
+
135
+ * chore: remove share scope hoist and module hoisting system
136
+
137
+ * chore: cleanup code
138
+
139
+ * chore: remove dead code from add module runtime plugin
140
+
141
+ likely can remove whole plugin in future
142
+
143
+ * chore: remove logs from delegate modules
144
+
145
+ * chore: remove old utils
146
+
147
+ * fix: add warning on auto page stitch
148
+
149
+ * fix: remove commented out code from InvertedContainerPlugin.ts
150
+
151
+ * chore: improve logging to see if its local load or remote load
152
+
153
+ * chore: clean up old custom promises factories
154
+
155
+ * fix: remove container proxy code
156
+
157
+ * fix: remove container proxy code
158
+ * automaticAsyncBoundary option has been removed
159
+
160
+ * fix: exclude specific pages from page map automatically
161
+
162
+ * refactor: conslidate codebase
163
+
164
+ * fix: improve hot reload share recovery
165
+
166
+ * refactor: remove server jsonp template
167
+
168
+ * chore: remove dead code from runtime modules
169
+
170
+ * fix: clean up jsonp getCustomJsonpCode
171
+
172
+ getting chunk loading global from compiler output options
173
+
174
+ * feat: adding cleanInitArrays runtime helper
175
+
176
+ * chore: remove share scope hoist and module hoisting system
177
+
178
+ * chore: cleanup code
179
+
180
+
181
+
182
+ ## [6.4.1-beta.3](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.2...nextjs-mf-6.4.1-beta.3) (2023-05-03)
183
+
184
+
185
+ ### Bug Fixes
186
+
187
+ * implement exact version resolution ([ee95f5f](https://github.com/module-federation/nextjs-mf/commit/ee95f5f3fb2d0d5757bfff85e85dcf6658673b9c))
188
+ * improve eager modularization ([f593725](https://github.com/module-federation/nextjs-mf/commit/f593725e24672dbf95eae018f2656cab68ec2c4e))
189
+ * improve module and async module loading in runtmie module ([c841a4b](https://github.com/module-federation/nextjs-mf/commit/c841a4bd9e2205b438fc1c8855c66e1eee764e0a))
190
+ * improve stability of chunk push ([98ad6ad](https://github.com/module-federation/nextjs-mf/commit/98ad6ad66ae19429a4808dc9215c6efef6b69fee))
191
+ * improve startup inversion ([42e59f1](https://github.com/module-federation/nextjs-mf/commit/42e59f1b0c58d98c4a16d1efd1ab00d0748311f0))
192
+ * prevent hmr destroying share scope ([ffc1131](https://github.com/module-federation/nextjs-mf/commit/ffc1131b2607387805d3137561df3ae756d07244))
193
+
194
+
195
+ ### Features
196
+
197
+ * eager load initial consumes ([6a05a5f](https://github.com/module-federation/nextjs-mf/commit/6a05a5f456dd0c5047f034cf7e9d3945a99f737b))
198
+ * install an async boundary runtime module ([cbbc7f5](https://github.com/module-federation/nextjs-mf/commit/cbbc7f53dd908c42cb1897e3aa9e70a9819a002a))
199
+
200
+
201
+
202
+ ## [6.4.1-beta.2](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.1...nextjs-mf-6.4.1-beta.2) (2023-04-28)
203
+
204
+
205
+ ### Bug Fixes
206
+
207
+ * disable next chunk splits ([2f731ee](https://github.com/module-federation/nextjs-mf/commit/2f731eee497c0f4d3057600f22bc2556e8b32410))
208
+
209
+
210
+
211
+ ## [6.4.1-beta.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.1-beta.0...nextjs-mf-6.4.1-beta.1) (2023-04-28)
212
+
213
+
214
+
215
+ ## [6.4.1-beta.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.0...nextjs-mf-6.4.1-beta.0) (2023-04-28)
216
+
217
+
218
+ ### Features
219
+
220
+ * [v7] host inversion ([#769](https://github.com/module-federation/nextjs-mf/issues/769)) ([53b9e4b](https://github.com/module-federation/nextjs-mf/commit/53b9e4b4a0dd11adfaf394140133e9244156b839))
221
+ * Custom Startup Runtime modules ([0f4bb27](https://github.com/module-federation/nextjs-mf/commit/0f4bb278a1e3be602c489d39062e7e236c47cca1))
222
+ * Improve module chunk connections ([#802](https://github.com/module-federation/nextjs-mf/issues/802)) ([ce0bd7b](https://github.com/module-federation/nextjs-mf/commit/ce0bd7b16e080f712e6db0bdcd3955a8167c274f)), closes [#803](https://github.com/module-federation/nextjs-mf/issues/803) [#808](https://github.com/module-federation/nextjs-mf/issues/808) [#811](https://github.com/module-federation/nextjs-mf/issues/811)
223
+ * remove child compiler pluign ([#780](https://github.com/module-federation/nextjs-mf/issues/780)) ([ed7ce3a](https://github.com/module-federation/nextjs-mf/commit/ed7ce3a6220bf0fa142da50d8101ad4693c8b178))
224
+
225
+
226
+ ### BREAKING CHANGES
227
+
228
+ * Internal child compilers are no longer used
229
+ BREAKING_CHANGE: Internal child compilers are no longer used
230
+
231
+
232
+
233
+ ## [6.3.1-beta.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.3.1...nextjs-mf-6.3.1-beta.0) (2023-04-19)
234
+
235
+
236
+ ### Bug Fixes
237
+
238
+ * cache busting and async quirks when mixing delegates ([1fc6e67](https://github.com/module-federation/nextjs-mf/commit/1fc6e67ee33a3efb53ff59d2b3ac333f1d42a158))
239
+ * ensure app functions with async boundary loader ([717e885](https://github.com/module-federation/nextjs-mf/commit/717e88558475158bf1eb5ae88e53a3624b3277ff))
240
+ * get delegates working ([#527](https://github.com/module-federation/nextjs-mf/issues/527)) ([7655568](https://github.com/module-federation/nextjs-mf/commit/7655568fcef8dbfda40573deb5d3d029c101074c))
241
+ * improved asset pipeline ([63928b2](https://github.com/module-federation/nextjs-mf/commit/63928b28150c2c4e3adb9e14fb7aa54f5cf1578d))
242
+ * move delegate modules into both webpack runtimes ([0570021](https://github.com/module-federation/nextjs-mf/commit/0570021d1040888a9f00394e64f7530a22e74a75))
243
+ * move host remote reg into loader ([188b9e4](https://github.com/module-federation/nextjs-mf/commit/188b9e432b95ba4934a838a49571435ea27b4d0b))
244
+ * peer dependencies metadata ([b603587](https://github.com/module-federation/nextjs-mf/commit/b6035870e5130bfd5b5c70951cc17bb38a50fbdd))
245
+ * put error triggers if delegates are passed non-primitives ([0a780bb](https://github.com/module-federation/nextjs-mf/commit/0a780bb07c9421b58605fc133f236a918ef5a0d8))
246
+ * remove dead code, use commonjs for delegate exports ([ad646d7](https://github.com/module-federation/nextjs-mf/commit/ad646d7306a2442ae6d9b2a72b33fb5ce66a9ba4))
247
+ * solve double async boundary ([88b3f4f](https://github.com/module-federation/nextjs-mf/commit/88b3f4f08b217e2f88b535ec9c7290bad697888b))
248
+ * solve externalization ([49f52e5](https://github.com/module-federation/nextjs-mf/commit/49f52e53ddddc990d31e6aa510d67dc0552a9d9a))
249
+ * support windows paths ([98ca26f](https://github.com/module-federation/nextjs-mf/commit/98ca26f3062b9fa67fc8ba8152fd85eda9b5df10))
250
+ * use EntryPlugin for injection of remotes ([e522c5a](https://github.com/module-federation/nextjs-mf/commit/e522c5ad2b7adcbd6c39f9c5fdb7a3e418277b7a))
251
+
252
+
253
+ ### Features
254
+
255
+ * delegate module support ([76c9df3](https://github.com/module-federation/nextjs-mf/commit/76c9df3b97d60040466e9a01cfe3f45e8f9c6b78))
256
+ * delegate module support ([3567aa5](https://github.com/module-federation/nextjs-mf/commit/3567aa5f6d0a00ca6df103c796657eb8953bc96a))
257
+ * delegate module support ([8dd154c](https://github.com/module-federation/nextjs-mf/commit/8dd154c261b34183b12250ce204904cd3e085658))
258
+ * delegates part two ([1be2686](https://github.com/module-federation/nextjs-mf/commit/1be2686624798a7df9f447b48279294985b3f592))
259
+ * implement basic single runtime ([2432c3e](https://github.com/module-federation/nextjs-mf/commit/2432c3ec553759ca24d17a46b696c1123a86ec5a))
260
+ * implement module runtime hoisting ([17c5b2f](https://github.com/module-federation/nextjs-mf/commit/17c5b2fc5f67c4321959ae30a69742c3128bc9a5))
261
+ * improve automatic async boundary loader on single compile instance ([63fc327](https://github.com/module-federation/nextjs-mf/commit/63fc3273500d1626c7e8c4dab14268ae5cb9de7a))
262
+ * improve chunk correlation ([22d8afc](https://github.com/module-federation/nextjs-mf/commit/22d8afccff101044fcdeba390656950dbc6eafed))
263
+ * new chunk flushing system for exposed modules ([97a75d8](https://github.com/module-federation/nextjs-mf/commit/97a75d8702f2ddc5e12cff2ac4d24aca1df6f990))
264
+ * new next federation plugin ([7e096df](https://github.com/module-federation/nextjs-mf/commit/7e096df89682369cdc92095be6936b58b9b5787f))
265
+ * new output copy plugin for prod server exposure ([85da209](https://github.com/module-federation/nextjs-mf/commit/85da209103046567bdc93f71d421ea413ac1d37b))
266
+ * remove child compilers ([c124f37](https://github.com/module-federation/nextjs-mf/commit/c124f3797ad327971066a4ad75f0317531653c08))
267
+ * removing old promise template stuff from build utils ([d827cd6](https://github.com/module-federation/nextjs-mf/commit/d827cd60fc12bd65b4091db5f7e3d9b96bcdc12b))
268
+
269
+
270
+ ### BREAKING CHANGES
271
+
272
+ * Plugin No longer uses child sidecars to create containers.
273
+ * deleting support for promiseTemplate
274
+
275
+
276
+
277
+ ## [6.5.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.5.0...nextjs-mf-6.5.1) (2023-05-22)
278
+
279
+ ### Dependency Updates
280
+
281
+ * `node` updated to version `0.15.1`
282
+ * `node` updated to version `0.15.1`
283
+
284
+
5
285
  # [6.5.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.4.0...nextjs-mf-6.5.0) (2023-05-22)
6
286
 
7
287
  ### Dependency Updates
package/README.md CHANGED
@@ -28,6 +28,9 @@ You do not need to share these packages, sharing next internals yourself will ca
28
28
  <details>
29
29
  <summary> See DEFAULT_SHARE_SCOPE:</summary>
30
30
 
31
+ <details>
32
+ <summary> See DEFAULT_SHARE_SCOPE:</summary>
33
+
31
34
  ```js
32
35
  const DEFAULT_SHARE_SCOPE = {
33
36
  react: {
@@ -122,7 +125,6 @@ new NextFederationPlugin({
122
125
  exposePages: boolean, // `false` by default
123
126
  enableImageLoaderFix: boolean, // `false` by default
124
127
  enableUrlLoaderFix: boolean, // `false` by default
125
- automaticAsyncBoundary: boolean, // `false` by default
126
128
  skipSharingNextInternals: boolean, // `false` by default
127
129
  },
128
130
  });
@@ -131,7 +133,6 @@ new NextFederationPlugin({
131
133
  - `exposePages` – exposes automatically all nextjs pages for you and theirs `./pages-map`.
132
134
  - `enableImageLoaderFix` – adds public hostname to all assets bundled by `nextjs-image-loader`. So if you serve remoteEntry from `http://example.com` then all bundled assets will get this hostname in runtime. It's something like Base URL in HTML but for federated modules.
133
135
  - `enableUrlLoaderFix` – adds public hostname to all assets bundled by `url-loader`.
134
- - `automaticAsyncBoundary` – adds automatic async boundary for all federated modules. It's required for sync imports to work.
135
136
  - `skipSharingNextInternals` – disables sharing of next internals. You can use it if you want to share next internals yourself or want to use this plugin on non next applications
136
137
 
137
138
  ### BREAKING CHANGE ABOUT SHARED MODULES:
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@module-federation/nextjs-mf",
3
- "version": "6.5.0",
3
+ "version": "6.5.2-beta.0",
4
4
  "license": "MIT",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
7
7
  "public": true,
8
- "type": "commonjs",
9
8
  "description": "Module Federation helper for NextJS",
10
- "repository": "https://github.com/module-federation/nextjs-mf/tree/main/packages/nextjs-mf",
9
+ "repository": "https://github.com/module-federation/universe/tree/main/packages/nextjs-mf",
11
10
  "author": "Zack Jackson <zackary.l.jackson@gmail.com>",
12
11
  "contributors": [
13
12
  "Pavel Chertorogov, nodkz <pavel.chertorogov@gmail.com> (www.ps.kz)"
@@ -16,13 +15,13 @@
16
15
  "registry": "https://registry.npmjs.org/"
17
16
  },
18
17
  "dependencies": {
19
- "@module-federation/node": "0.12.2",
20
18
  "encoding": "0.1.13",
21
19
  "eventemitter3": "^5.0.0",
22
20
  "fast-glob": "^3.2.11",
23
- "node-fetch": "2.6.11",
21
+ "node-fetch": "2.6.9",
24
22
  "webpack-sources": "^3.2.3",
25
- "@module-federation/utilities": "1.8.0"
23
+ "@module-federation/node": "0.15.2-beta.0",
24
+ "@module-federation/utilities": "1.8.2-beta.0"
26
25
  },
27
26
  "peerDependencies": {
28
27
  "next": "^12 || ^13",
@@ -0,0 +1,2 @@
1
+ declare const _exports: Promise<any>;
2
+ export = _exports;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // eslint-disable-next-line no-async-promise-executor
3
+ module.exports = new Promise(async (resolve, reject) => {
4
+ const { importDelegatedModule } = await import('@module-federation/utilities/src/utils/common');
5
+ // eslint-disable-next-line no-undef
6
+ const currentRequest = new URLSearchParams(__resourceQuery).get('remote');
7
+ const [global, url] = currentRequest.split('@');
8
+ importDelegatedModule({
9
+ global,
10
+ url: url + '?' + Date.now(),
11
+ })
12
+ .then((remote) => {
13
+ resolve(remote);
14
+ })
15
+ .catch((err) => reject(err));
16
+ });
17
+ //# sourceMappingURL=default-delegate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-delegate.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/default-delegate.js"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,MAAM,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACrD,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAC5C,+CAA+C,CAChD,CAAC;IACF,oCAAoC;IACpC,MAAM,cAAc,GAAG,IAAI,eAAe,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC1E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChD,qBAAqB,CAAC;QACpB,MAAM;QACN,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;KAC5B,CAAC;SACC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;QACf,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=delegate-hoist-container.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegate-hoist-container.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/delegate-hoist-container.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ module.exports = {};
3
+ //# sourceMappingURL=federation-noop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"federation-noop.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/federation-noop.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC"}
package/src/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { NextFederationPlugin } from './plugins/NextFederationPlugin';
1
+ import NextFederationPlugin from "./plugins/NextFederationPlugin";
2
2
  export { NextFederationPlugin };
3
3
  export default NextFederationPlugin;
package/src/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NextFederationPlugin = void 0;
4
- const NextFederationPlugin_1 = require("./plugins/NextFederationPlugin");
5
- Object.defineProperty(exports, "NextFederationPlugin", { enumerable: true, get: function () { return NextFederationPlugin_1.NextFederationPlugin; } });
6
- exports.default = NextFederationPlugin_1.NextFederationPlugin;
7
- module.exports = NextFederationPlugin_1.NextFederationPlugin;
8
- module.exports.NextFederationPlugin = NextFederationPlugin_1.NextFederationPlugin;
4
+ const tslib_1 = require("tslib");
5
+ const NextFederationPlugin_1 = tslib_1.__importDefault(require("./plugins/NextFederationPlugin"));
6
+ exports.NextFederationPlugin = NextFederationPlugin_1.default;
7
+ exports.default = NextFederationPlugin_1.default;
8
+ module.exports = NextFederationPlugin_1.default;
9
+ module.exports.NextFederationPlugin = NextFederationPlugin_1.default;
9
10
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/index.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAE7D,qGAFA,2CAAoB,OAEA;AAC7B,kBAAe,2CAAoB,CAAC;AAEpC,MAAM,CAAC,OAAO,GAAG,2CAAoB,CAAC;AACtC,MAAM,CAAC,OAAO,CAAC,oBAAoB,GAAG,2CAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/index.ts"],"names":[],"mappings":";;;;AAAA,kGAAkE;AAEzD,+BAFF,8BAAoB,CAEE;AAC7B,kBAAe,8BAAoB,CAAC;AAEpC,MAAM,CAAC,OAAO,GAAG,8BAAoB,CAAC;AACtC,MAAM,CAAC,OAAO,CAAC,oBAAoB,GAAG,8BAAoB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  "use strict";
2
2
  // placeholder file for delegate module injection
3
+ // placeholder for module hoist injection, precursor to startup inversion
3
4
  //# sourceMappingURL=internal-delegate-hoist.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"internal-delegate-hoist.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/internal-delegate-hoist.js"],"names":[],"mappings":";AAAA,iDAAiD"}
1
+ {"version":3,"file":"internal-delegate-hoist.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/internal-delegate-hoist.js"],"names":[],"mappings":";AAAA,iDAAiD;AACjD,yEAAyE"}
package/src/internal.d.ts CHANGED
@@ -1,13 +1,42 @@
1
- import type { Compiler } from 'webpack';
2
- import type { ModuleFederationPluginOptions, Shared, SharedConfig, SharedObject } from '@module-federation/utilities';
1
+ import type { SharedObject } from '@module-federation/utilities';
2
+ /**
3
+ * @typedef SharedObject
4
+ * @type {object}
5
+ * @property {object} [key] - The key representing the shared object's package name.
6
+ * @property {boolean} key.singleton - Whether the shared object should be a singleton.
7
+ * @property {boolean} key.requiredVersion - Whether a specific version of the shared object is required.
8
+ * @property {boolean} key.eager - Whether the shared object should be eagerly loaded.
9
+ * @property {boolean} key.import - Whether the shared object should be imported or not.
10
+ */
3
11
  export declare const DEFAULT_SHARE_SCOPE: SharedObject;
4
- export declare const reKeyHostShared: (options?: Shared) => Record<string, SharedConfig>;
5
- export declare const generateRemoteTemplate: (url: string, global: any) => string;
6
- export declare const internalizeSharedPackages: (options: ModuleFederationPluginOptions, compiler: Compiler) => void;
7
- export declare const externalizedShares: SharedObject;
8
- export declare const getOutputPath: (compiler: Compiler) => string;
9
- export declare const removePlugins: string[];
10
- export declare const parseRemoteSyntax: (remote: string) => string;
12
+ /**
13
+ * A default share scope for the browser environment.
14
+ * It takes the DEFAULT_SHARE_SCOPE and sets eager to true for all entries.
15
+ * The module hoisting system relocates these modules into the right runtime and out of the remote
16
+ *
17
+ * @type {SharedObject}
18
+ */
19
+ export declare const DEFAULT_SHARE_SCOPE_BROWSER: SharedObject;
20
+ /**
21
+ * Parses the remotes object, checking if they are using a custom promise template or not.
22
+ * If it's a custom promise template, the remote syntax is parsed to get the module name and version number.
23
+ *
24
+ * @param {Record<string, any>} remotes - The remotes object to be parsed.
25
+ * @returns {Record<string, string>} - The parsed remotes object.
26
+ */
11
27
  export declare const parseRemotes: (remotes: Record<string, any>) => Record<string, string>;
28
+ /**
29
+ * Gets the delegate modules from the remotes object.
30
+ *
31
+ * @param {Record<string, any>} remotes - The remotes object containing delegates.
32
+ * @returns {Record<string, string>} - The delegate modules from the remotes object.
33
+ */
12
34
  export declare const getDelegates: (remotes: Record<string, any>) => Record<string, string>;
35
+ /**
36
+ * Converts an array of Error objects into a single string with formatted error messages,
37
+ * separated by newline characters.
38
+ *
39
+ * @param {Error[]} err - The array of Error objects.
40
+ * @returns {string} - The combined formatted error messages as a single string.
41
+ */
13
42
  export declare const toDisplayErrors: (err: Error[]) => string;