@module-federation/nextjs-mf 6.5.1 → 6.5.2-rc.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 (107) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/README.md +3 -2
  3. package/package.json +4 -4
  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/ContainerStatsPlugin.d.ts +6 -0
  31. package/src/plugins/ContainerStatsPlugin.js +176 -0
  32. package/src/plugins/ContainerStatsPlugin.js.map +1 -0
  33. package/src/plugins/CopyFederationPlugin.d.ts +7 -0
  34. package/src/plugins/CopyFederationPlugin.js +48 -0
  35. package/src/plugins/CopyFederationPlugin.js.map +1 -0
  36. package/src/plugins/JsonpChunkLoading.d.ts +7 -0
  37. package/src/plugins/JsonpChunkLoading.js +41 -0
  38. package/src/plugins/JsonpChunkLoading.js.map +1 -0
  39. package/src/plugins/NextFederationPlugin/apply-client-plugins.d.ts +24 -0
  40. package/src/plugins/NextFederationPlugin/apply-client-plugins.js +78 -0
  41. package/src/plugins/NextFederationPlugin/apply-client-plugins.js.map +1 -0
  42. package/src/plugins/NextFederationPlugin/apply-server-plugins.d.ts +53 -0
  43. package/src/plugins/NextFederationPlugin/apply-server-plugins.js +159 -0
  44. package/src/plugins/NextFederationPlugin/apply-server-plugins.js.map +1 -0
  45. package/src/plugins/NextFederationPlugin/index.d.ts +18 -0
  46. package/src/plugins/NextFederationPlugin/index.js +136 -0
  47. package/src/plugins/NextFederationPlugin/index.js.map +1 -0
  48. package/src/plugins/NextFederationPlugin/next-fragments.d.ts +33 -0
  49. package/src/plugins/NextFederationPlugin/next-fragments.js +79 -0
  50. package/src/plugins/NextFederationPlugin/next-fragments.js.map +1 -0
  51. package/src/plugins/NextFederationPlugin/regex-equal.d.ts +14 -0
  52. package/src/plugins/NextFederationPlugin/regex-equal.js +25 -0
  53. package/src/plugins/NextFederationPlugin/regex-equal.js.map +1 -0
  54. package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.d.ts +1 -0
  55. package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.js +20 -0
  56. package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.js.map +1 -0
  57. package/src/plugins/NextFederationPlugin/set-options.d.ts +20 -0
  58. package/src/plugins/NextFederationPlugin/set-options.js +33 -0
  59. package/src/plugins/NextFederationPlugin/set-options.js.map +1 -0
  60. package/src/plugins/NextFederationPlugin/validate-options.d.ts +26 -0
  61. package/src/plugins/NextFederationPlugin/validate-options.js +46 -0
  62. package/src/plugins/NextFederationPlugin/validate-options.js.map +1 -0
  63. package/src/plugins/container/InvertedContainerPlugin.d.ts +30 -0
  64. package/src/plugins/container/InvertedContainerPlugin.js +175 -0
  65. package/src/plugins/container/InvertedContainerPlugin.js.map +1 -0
  66. package/src/plugins/container/InvertedContainerRuntimeModule.d.ts +45 -0
  67. package/src/plugins/container/InvertedContainerRuntimeModule.js +511 -0
  68. package/src/plugins/container/InvertedContainerRuntimeModule.js.map +1 -0
  69. package/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.d.ts +17 -0
  70. package/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.js +91 -0
  71. package/src/plugins/container/RemoveEagerModulesFromRuntimePlugin.js.map +1 -0
  72. package/src/plugins/container/custom-jsonp.d.ts +2 -0
  73. package/src/plugins/container/custom-jsonp.js +123 -0
  74. package/src/plugins/container/custom-jsonp.js.map +1 -0
  75. package/src/plugins/container/types.d.ts +2 -0
  76. package/src/plugins/container/types.js +3 -0
  77. package/src/plugins/container/types.js.map +1 -0
  78. package/utils/Template.d.ts +1 -1
  79. package/utils/Template.js +1 -1
  80. package/utils/Template.js.map +1 -1
  81. package/utils/build-utils.d.ts +0 -8
  82. package/utils/build-utils.js +1 -228
  83. package/utils/build-utils.js.map +1 -1
  84. package/utils/flushedChunks.d.ts +10 -0
  85. package/utils/flushedChunks.js +40 -0
  86. package/utils/flushedChunks.js.map +1 -0
  87. package/utils/index.d.ts +3 -12
  88. package/utils/index.js +7 -35
  89. package/utils/index.js.map +1 -1
  90. package/src/include-defaults.js +0 -16
  91. package/src/include-defaults.js.map +0 -1
  92. package/src/loaders/async-boundary-loader.d.ts +0 -2
  93. package/src/loaders/async-boundary-loader.js +0 -69
  94. package/src/loaders/async-boundary-loader.js.map +0 -1
  95. package/src/plugins/ChildFederationPlugin.d.ts +0 -11
  96. package/src/plugins/ChildFederationPlugin.js +0 -299
  97. package/src/plugins/ChildFederationPlugin.js.map +0 -1
  98. package/src/plugins/ModuleFederationPlugin.d.ts +0 -7
  99. package/src/plugins/ModuleFederationPlugin.js +0 -50
  100. package/src/plugins/ModuleFederationPlugin.js.map +0 -1
  101. package/src/plugins/NextFederationPlugin.d.ts +0 -9
  102. package/src/plugins/NextFederationPlugin.js +0 -234
  103. package/src/plugins/NextFederationPlugin.js.map +0 -1
  104. package/src/plugins/RemoveRRRuntimePlugin.d.ts +0 -5
  105. package/src/plugins/RemoveRRRuntimePlugin.js +0 -40
  106. package/src/plugins/RemoveRRRuntimePlugin.js.map +0 -1
  107. /package/src/{include-defaults.d.ts → delegate-hoist-container.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,253 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [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)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * chunk and module duplications ([#885](https://github.com/module-federation/nextjs-mf/issues/885)) ([199e6b9](https://github.com/module-federation/nextjs-mf/commit/199e6b9937f4a2ca6caedb3ae4767342de463cb6))
11
+ * client prod build issues ([#899](https://github.com/module-federation/nextjs-mf/issues/899)) ([470d7ad](https://github.com/module-federation/nextjs-mf/commit/470d7ad408ae8d64dbccc5a9528eaa2ed60fa2ca))
12
+ * deprecation warnings about chunkGraph ([9af484d](https://github.com/module-federation/nextjs-mf/commit/9af484dedba44b346d25ac5cdd10292ad018143d))
13
+ * 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))
14
+ * 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))
15
+
16
+
17
+
18
+ ## [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)
19
+
20
+
21
+
22
+ ## [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)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **chunk-module-duplication:** prevent runtime reset and share scope loss ([14bfc38](https://github.com/module-federation/nextjs-mf/commit/14bfc38515a4da3be7321d4b6d876905d45ad20b))
28
+
29
+
30
+
31
+ ## [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)
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * 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))
37
+ * remove old files ([fa281ec](https://github.com/module-federation/nextjs-mf/commit/fa281ecf0a5486bcf995f548deaef993f437c068))
38
+
39
+
40
+ ### Features
41
+
42
+ * remove entry injection ([4e6981f](https://github.com/module-federation/nextjs-mf/commit/4e6981f8d8a312ae383b1c2cd337882b268e2b9b))
43
+
44
+
45
+
46
+ ## [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)
47
+
48
+
49
+ ### Bug Fixes
50
+
51
+ * ensure eager modules always exist in host (inject dependent modules somewhere in build pipeline) ([12bb896](https://github.com/module-federation/nextjs-mf/commit/12bb896d37324b4f3d0d59da04463b1d04428a01))
52
+
53
+
54
+
55
+ ## [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)
56
+
57
+
58
+ ### Features
59
+
60
+ * Quantum Modules ([#872](https://github.com/module-federation/nextjs-mf/issues/872)) ([2991039](https://github.com/module-federation/nextjs-mf/commit/299103932b4e0aa6d8017be588ffa5272f519260))
61
+
62
+
63
+
64
+ ## [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)
65
+
66
+
67
+ ### Bug Fixes
68
+
69
+ * remove debugging runtime variable ([d15dc2d](https://github.com/module-federation/nextjs-mf/commit/d15dc2dc6f6297532d89295690c6f561fee7955f))
70
+
71
+
72
+
73
+ ## [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)
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * add warning on auto page stitch ([2f068cf](https://github.com/module-federation/nextjs-mf/commit/2f068cfd71f0aad12285b9ab4cfbd515f399211c))
79
+ * remove commented out code from InvertedContainerPlugin.ts ([7d52961](https://github.com/module-federation/nextjs-mf/commit/7d529612869f061733d7d87c9770036b7c2b0bbb))
80
+ * resolve backmerge issues with build ([2ad095c](https://github.com/module-federation/nextjs-mf/commit/2ad095cc3198dfd153644cee5fb4f37fa3bf6f03))
81
+
82
+
83
+ ### Features
84
+
85
+ * [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)
86
+ * [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)
87
+ * enable eager sharing ([b1e4418](https://github.com/module-federation/nextjs-mf/commit/b1e4418304afd30c5f4719469db50c17c279a021))
88
+
89
+
90
+ ### BREAKING CHANGES
91
+
92
+ * automaticAsyncBoundary option has been removed
93
+
94
+ * fix: exclude specific pages from page map automatically
95
+
96
+ * refactor: conslidate codebase
97
+
98
+ * fix: improve hot reload share recovery
99
+
100
+ * refactor: remove server jsonp template
101
+
102
+ * chore: remove dead code from runtime modules
103
+
104
+ * fix: clean up jsonp getCustomJsonpCode
105
+
106
+ getting chunk loading global from compiler output options
107
+
108
+ * feat: adding cleanInitArrays runtime helper
109
+
110
+ * chore: remove share scope hoist and module hoisting system
111
+
112
+ * chore: cleanup code
113
+
114
+ * chore: remove dead code from add module runtime plugin
115
+
116
+ likely can remove whole plugin in future
117
+
118
+ * chore: remove logs from delegate modules
119
+
120
+ * chore: remove old utils
121
+
122
+ * fix: add warning on auto page stitch
123
+
124
+ * fix: remove commented out code from InvertedContainerPlugin.ts
125
+
126
+ * chore: improve logging to see if its local load or remote load
127
+
128
+ * chore: clean up old custom promises factories
129
+
130
+ * fix: remove container proxy code
131
+
132
+ * fix: remove container proxy code
133
+ * automaticAsyncBoundary option has been removed
134
+
135
+ * fix: exclude specific pages from page map automatically
136
+
137
+ * refactor: conslidate codebase
138
+
139
+ * fix: improve hot reload share recovery
140
+
141
+ * refactor: remove server jsonp template
142
+
143
+ * chore: remove dead code from runtime modules
144
+
145
+ * fix: clean up jsonp getCustomJsonpCode
146
+
147
+ getting chunk loading global from compiler output options
148
+
149
+ * feat: adding cleanInitArrays runtime helper
150
+
151
+ * chore: remove share scope hoist and module hoisting system
152
+
153
+ * chore: cleanup code
154
+
155
+
156
+
157
+ ## [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)
158
+
159
+
160
+ ### Bug Fixes
161
+
162
+ * implement exact version resolution ([ee95f5f](https://github.com/module-federation/nextjs-mf/commit/ee95f5f3fb2d0d5757bfff85e85dcf6658673b9c))
163
+ * improve eager modularization ([f593725](https://github.com/module-federation/nextjs-mf/commit/f593725e24672dbf95eae018f2656cab68ec2c4e))
164
+ * improve module and async module loading in runtmie module ([c841a4b](https://github.com/module-federation/nextjs-mf/commit/c841a4bd9e2205b438fc1c8855c66e1eee764e0a))
165
+ * improve stability of chunk push ([98ad6ad](https://github.com/module-federation/nextjs-mf/commit/98ad6ad66ae19429a4808dc9215c6efef6b69fee))
166
+ * improve startup inversion ([42e59f1](https://github.com/module-federation/nextjs-mf/commit/42e59f1b0c58d98c4a16d1efd1ab00d0748311f0))
167
+ * prevent hmr destroying share scope ([ffc1131](https://github.com/module-federation/nextjs-mf/commit/ffc1131b2607387805d3137561df3ae756d07244))
168
+
169
+
170
+ ### Features
171
+
172
+ * eager load initial consumes ([6a05a5f](https://github.com/module-federation/nextjs-mf/commit/6a05a5f456dd0c5047f034cf7e9d3945a99f737b))
173
+ * install an async boundary runtime module ([cbbc7f5](https://github.com/module-federation/nextjs-mf/commit/cbbc7f53dd908c42cb1897e3aa9e70a9819a002a))
174
+
175
+
176
+
177
+ ## [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)
178
+
179
+
180
+ ### Bug Fixes
181
+
182
+ * disable next chunk splits ([2f731ee](https://github.com/module-federation/nextjs-mf/commit/2f731eee497c0f4d3057600f22bc2556e8b32410))
183
+
184
+
185
+
186
+ ## [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)
187
+
188
+
189
+
190
+ ## [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)
191
+
192
+
193
+ ### Features
194
+
195
+ * [v7] host inversion ([#769](https://github.com/module-federation/nextjs-mf/issues/769)) ([53b9e4b](https://github.com/module-federation/nextjs-mf/commit/53b9e4b4a0dd11adfaf394140133e9244156b839))
196
+ * Custom Startup Runtime modules ([0f4bb27](https://github.com/module-federation/nextjs-mf/commit/0f4bb278a1e3be602c489d39062e7e236c47cca1))
197
+ * 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)
198
+ * remove child compiler pluign ([#780](https://github.com/module-federation/nextjs-mf/issues/780)) ([ed7ce3a](https://github.com/module-federation/nextjs-mf/commit/ed7ce3a6220bf0fa142da50d8101ad4693c8b178))
199
+
200
+
201
+ ### BREAKING CHANGES
202
+
203
+ * Internal child compilers are no longer used
204
+ BREAKING_CHANGE: Internal child compilers are no longer used
205
+
206
+
207
+
208
+ ## [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)
209
+
210
+
211
+ ### Bug Fixes
212
+
213
+ * cache busting and async quirks when mixing delegates ([1fc6e67](https://github.com/module-federation/nextjs-mf/commit/1fc6e67ee33a3efb53ff59d2b3ac333f1d42a158))
214
+ * ensure app functions with async boundary loader ([717e885](https://github.com/module-federation/nextjs-mf/commit/717e88558475158bf1eb5ae88e53a3624b3277ff))
215
+ * get delegates working ([#527](https://github.com/module-federation/nextjs-mf/issues/527)) ([7655568](https://github.com/module-federation/nextjs-mf/commit/7655568fcef8dbfda40573deb5d3d029c101074c))
216
+ * improved asset pipeline ([63928b2](https://github.com/module-federation/nextjs-mf/commit/63928b28150c2c4e3adb9e14fb7aa54f5cf1578d))
217
+ * move delegate modules into both webpack runtimes ([0570021](https://github.com/module-federation/nextjs-mf/commit/0570021d1040888a9f00394e64f7530a22e74a75))
218
+ * move host remote reg into loader ([188b9e4](https://github.com/module-federation/nextjs-mf/commit/188b9e432b95ba4934a838a49571435ea27b4d0b))
219
+ * peer dependencies metadata ([b603587](https://github.com/module-federation/nextjs-mf/commit/b6035870e5130bfd5b5c70951cc17bb38a50fbdd))
220
+ * put error triggers if delegates are passed non-primitives ([0a780bb](https://github.com/module-federation/nextjs-mf/commit/0a780bb07c9421b58605fc133f236a918ef5a0d8))
221
+ * remove dead code, use commonjs for delegate exports ([ad646d7](https://github.com/module-federation/nextjs-mf/commit/ad646d7306a2442ae6d9b2a72b33fb5ce66a9ba4))
222
+ * solve double async boundary ([88b3f4f](https://github.com/module-federation/nextjs-mf/commit/88b3f4f08b217e2f88b535ec9c7290bad697888b))
223
+ * solve externalization ([49f52e5](https://github.com/module-federation/nextjs-mf/commit/49f52e53ddddc990d31e6aa510d67dc0552a9d9a))
224
+ * support windows paths ([98ca26f](https://github.com/module-federation/nextjs-mf/commit/98ca26f3062b9fa67fc8ba8152fd85eda9b5df10))
225
+ * use EntryPlugin for injection of remotes ([e522c5a](https://github.com/module-federation/nextjs-mf/commit/e522c5ad2b7adcbd6c39f9c5fdb7a3e418277b7a))
226
+
227
+
228
+ ### Features
229
+
230
+ * delegate module support ([76c9df3](https://github.com/module-federation/nextjs-mf/commit/76c9df3b97d60040466e9a01cfe3f45e8f9c6b78))
231
+ * delegate module support ([3567aa5](https://github.com/module-federation/nextjs-mf/commit/3567aa5f6d0a00ca6df103c796657eb8953bc96a))
232
+ * delegate module support ([8dd154c](https://github.com/module-federation/nextjs-mf/commit/8dd154c261b34183b12250ce204904cd3e085658))
233
+ * delegates part two ([1be2686](https://github.com/module-federation/nextjs-mf/commit/1be2686624798a7df9f447b48279294985b3f592))
234
+ * implement basic single runtime ([2432c3e](https://github.com/module-federation/nextjs-mf/commit/2432c3ec553759ca24d17a46b696c1123a86ec5a))
235
+ * implement module runtime hoisting ([17c5b2f](https://github.com/module-federation/nextjs-mf/commit/17c5b2fc5f67c4321959ae30a69742c3128bc9a5))
236
+ * improve automatic async boundary loader on single compile instance ([63fc327](https://github.com/module-federation/nextjs-mf/commit/63fc3273500d1626c7e8c4dab14268ae5cb9de7a))
237
+ * improve chunk correlation ([22d8afc](https://github.com/module-federation/nextjs-mf/commit/22d8afccff101044fcdeba390656950dbc6eafed))
238
+ * new chunk flushing system for exposed modules ([97a75d8](https://github.com/module-federation/nextjs-mf/commit/97a75d8702f2ddc5e12cff2ac4d24aca1df6f990))
239
+ * new next federation plugin ([7e096df](https://github.com/module-federation/nextjs-mf/commit/7e096df89682369cdc92095be6936b58b9b5787f))
240
+ * new output copy plugin for prod server exposure ([85da209](https://github.com/module-federation/nextjs-mf/commit/85da209103046567bdc93f71d421ea413ac1d37b))
241
+ * remove child compilers ([c124f37](https://github.com/module-federation/nextjs-mf/commit/c124f3797ad327971066a4ad75f0317531653c08))
242
+ * removing old promise template stuff from build utils ([d827cd6](https://github.com/module-federation/nextjs-mf/commit/d827cd60fc12bd65b4091db5f7e3d9b96bcdc12b))
243
+
244
+
245
+ ### BREAKING CHANGES
246
+
247
+ * Plugin No longer uses child sidecars to create containers.
248
+ * deleting support for promiseTemplate
249
+
250
+
251
+
5
252
  ## [6.5.1](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.5.0...nextjs-mf-6.5.1) (2023-05-22)
6
253
 
7
254
  ### 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/nextjs-mf",
3
- "version": "6.5.1",
3
+ "version": "6.5.2-rc.0",
4
4
  "license": "MIT",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -16,13 +16,13 @@
16
16
  "registry": "https://registry.npmjs.org/"
17
17
  },
18
18
  "dependencies": {
19
- "@module-federation/node": "0.12.2",
20
19
  "encoding": "0.1.13",
21
20
  "eventemitter3": "^5.0.0",
22
21
  "fast-glob": "^3.2.11",
23
- "node-fetch": "2.6.11",
22
+ "node-fetch": "2.6.9",
24
23
  "webpack-sources": "^3.2.3",
25
- "@module-federation/utilities": "1.8.0"
24
+ "@module-federation/node": "0.15.2-rc.0",
25
+ "@module-federation/utilities": "1.8.1-rc.1"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "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;