@module-federation/nextjs-mf 6.4.0 → 6.4.1-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.
- package/CHANGELOG.md +107 -0
- package/README.md +3 -0
- package/package.json +4 -4
- package/src/default-delegate.d.ts +2 -0
- package/src/default-delegate.js +17 -0
- package/src/default-delegate.js.map +1 -0
- package/src/delegate-hoist-container.d.ts +0 -0
- package/src/delegate-hoist-container.js +2 -0
- package/src/delegate-hoist-container.js.map +1 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +6 -5
- package/src/index.js.map +1 -1
- package/src/internal-delegate-hoist.js +1 -0
- package/src/internal-delegate-hoist.js.map +1 -1
- package/src/internal.d.ts +39 -9
- package/src/internal.js +149 -235
- package/src/internal.js.map +1 -1
- package/src/inverse-self-formation.d.ts +0 -0
- package/src/inverse-self-formation.js +2 -0
- package/src/inverse-self-formation.js.map +1 -0
- package/src/loaders/async-boundary-loader.js +10 -2
- package/src/loaders/async-boundary-loader.js.map +1 -1
- package/src/loaders/delegateLoader.js +2 -4
- package/src/loaders/delegateLoader.js.map +1 -1
- package/src/loaders/inject-hoist.d.ts +3 -0
- package/src/loaders/inject-hoist.js +8 -0
- package/src/loaders/inject-hoist.js.map +1 -0
- package/src/loaders/nextPageMapLoader.js +0 -2
- package/src/loaders/nextPageMapLoader.js.map +1 -1
- package/src/loaders/share-scope-hoist.d.ts +5 -0
- package/src/loaders/share-scope-hoist.js +52 -0
- package/src/loaders/share-scope-hoist.js.map +1 -0
- package/src/plugins/AddModulesToRuntime.d.ts +19 -0
- package/src/plugins/AddModulesToRuntime.js +268 -0
- package/src/plugins/AddModulesToRuntime.js.map +1 -0
- package/src/plugins/ContainerStatsPlugin.d.ts +6 -0
- package/src/plugins/ContainerStatsPlugin.js +176 -0
- package/src/plugins/ContainerStatsPlugin.js.map +1 -0
- package/src/plugins/CopyFederationPlugin.d.ts +7 -0
- package/src/plugins/CopyFederationPlugin.js +48 -0
- package/src/plugins/CopyFederationPlugin.js.map +1 -0
- package/src/plugins/NextFederationPlugin/apply-automatic-async-boundary.d.ts +11 -0
- package/src/plugins/NextFederationPlugin/apply-automatic-async-boundary.js +61 -0
- package/src/plugins/NextFederationPlugin/apply-automatic-async-boundary.js.map +1 -0
- package/src/plugins/NextFederationPlugin/apply-client-plugins.d.ts +24 -0
- package/src/plugins/NextFederationPlugin/apply-client-plugins.js +79 -0
- package/src/plugins/NextFederationPlugin/apply-client-plugins.js.map +1 -0
- package/src/plugins/NextFederationPlugin/apply-server-plugins.d.ts +61 -0
- package/src/plugins/NextFederationPlugin/apply-server-plugins.js +158 -0
- package/src/plugins/NextFederationPlugin/apply-server-plugins.js.map +1 -0
- package/src/plugins/NextFederationPlugin/index.d.ts +18 -0
- package/src/plugins/NextFederationPlugin/index.js +133 -0
- package/src/plugins/NextFederationPlugin/index.js.map +1 -0
- package/src/plugins/NextFederationPlugin/next-fragments.d.ts +44 -0
- package/src/plugins/NextFederationPlugin/next-fragments.js +115 -0
- package/src/plugins/NextFederationPlugin/next-fragments.js.map +1 -0
- package/src/plugins/NextFederationPlugin/regex-equal.d.ts +14 -0
- package/src/plugins/NextFederationPlugin/regex-equal.js +25 -0
- package/src/plugins/NextFederationPlugin/regex-equal.js.map +1 -0
- package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.d.ts +1 -0
- package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.js +20 -0
- package/src/plugins/NextFederationPlugin/remove-unnecessary-shared-keys.js.map +1 -0
- package/src/plugins/NextFederationPlugin/set-options.d.ts +21 -0
- package/src/plugins/NextFederationPlugin/set-options.js +35 -0
- package/src/plugins/NextFederationPlugin/set-options.js.map +1 -0
- package/src/plugins/NextFederationPlugin/validate-options.d.ts +26 -0
- package/src/plugins/NextFederationPlugin/validate-options.js +46 -0
- package/src/plugins/NextFederationPlugin/validate-options.js.map +1 -0
- package/src/plugins/async-pages-loader.d.ts +1 -0
- package/src/plugins/async-pages-loader.js +41 -0
- package/src/plugins/async-pages-loader.js.map +1 -0
- package/src/plugins/container/InvertedContainerPlugin.d.ts +25 -0
- package/src/plugins/container/InvertedContainerPlugin.js +73 -0
- package/src/plugins/container/InvertedContainerPlugin.js.map +1 -0
- package/src/plugins/container/InvertedContainerRuntimeModule.d.ts +42 -0
- package/src/plugins/container/InvertedContainerRuntimeModule.js +82 -0
- package/src/plugins/container/InvertedContainerRuntimeModule.js.map +1 -0
- package/src/plugins/container/types.d.ts +2 -0
- package/src/plugins/container/types.js +3 -0
- package/src/plugins/container/types.js.map +1 -0
- package/utils/Template.d.ts +1 -1
- package/utils/Template.js +1 -1
- package/utils/Template.js.map +1 -1
- package/utils/build-utils.d.ts +0 -8
- package/utils/build-utils.js +1 -228
- package/utils/build-utils.js.map +1 -1
- package/utils/index.d.ts +2 -2
- package/utils/index.js +8 -2
- package/utils/index.js.map +1 -1
- package/src/plugins/ChildFederationPlugin.d.ts +0 -11
- package/src/plugins/ChildFederationPlugin.js +0 -299
- package/src/plugins/ChildFederationPlugin.js.map +0 -1
- package/src/plugins/ModuleFederationPlugin.d.ts +0 -7
- package/src/plugins/ModuleFederationPlugin.js +0 -50
- package/src/plugins/ModuleFederationPlugin.js.map +0 -1
- package/src/plugins/NextFederationPlugin.d.ts +0 -9
- package/src/plugins/NextFederationPlugin.js +0 -234
- package/src/plugins/NextFederationPlugin.js.map +0 -1
- package/src/plugins/RemoveRRRuntimePlugin.d.ts +0 -5
- package/src/plugins/RemoveRRRuntimePlugin.js +0 -40
- package/src/plugins/RemoveRRRuntimePlugin.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,69 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [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)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* [v7] host inversion ([#769](https://github.com/module-federation/nextjs-mf/issues/769)) ([53b9e4b](https://github.com/module-federation/nextjs-mf/commit/53b9e4b4a0dd11adfaf394140133e9244156b839))
|
|
11
|
+
* Custom Startup Runtime modules ([0f4bb27](https://github.com/module-federation/nextjs-mf/commit/0f4bb278a1e3be602c489d39062e7e236c47cca1))
|
|
12
|
+
* 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)
|
|
13
|
+
* release to npm with next tag to not ruine latest one ([#763](https://github.com/module-federation/nextjs-mf/issues/763)) ([f2d199b](https://github.com/module-federation/nextjs-mf/commit/f2d199b3b3fbbd428514b1ce1f139efc82f7fff0))
|
|
14
|
+
* remove child compiler pluign ([#780](https://github.com/module-federation/nextjs-mf/issues/780)) ([ed7ce3a](https://github.com/module-federation/nextjs-mf/commit/ed7ce3a6220bf0fa142da50d8101ad4693c8b178))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGES
|
|
18
|
+
|
|
19
|
+
* Internal child compilers are no longer used
|
|
20
|
+
BREAKING_CHANGE: Internal child compilers are no longer used
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [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)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* cache busting and async quirks when mixing delegates ([1fc6e67](https://github.com/module-federation/nextjs-mf/commit/1fc6e67ee33a3efb53ff59d2b3ac333f1d42a158))
|
|
30
|
+
* ensure app functions with async boundary loader ([717e885](https://github.com/module-federation/nextjs-mf/commit/717e88558475158bf1eb5ae88e53a3624b3277ff))
|
|
31
|
+
* get delegates working ([#527](https://github.com/module-federation/nextjs-mf/issues/527)) ([7655568](https://github.com/module-federation/nextjs-mf/commit/7655568fcef8dbfda40573deb5d3d029c101074c))
|
|
32
|
+
* improved asset pipeline ([63928b2](https://github.com/module-federation/nextjs-mf/commit/63928b28150c2c4e3adb9e14fb7aa54f5cf1578d))
|
|
33
|
+
* move delegate modules into both webpack runtimes ([0570021](https://github.com/module-federation/nextjs-mf/commit/0570021d1040888a9f00394e64f7530a22e74a75))
|
|
34
|
+
* move host remote reg into loader ([188b9e4](https://github.com/module-federation/nextjs-mf/commit/188b9e432b95ba4934a838a49571435ea27b4d0b))
|
|
35
|
+
* peer dependencies metadata ([b603587](https://github.com/module-federation/nextjs-mf/commit/b6035870e5130bfd5b5c70951cc17bb38a50fbdd))
|
|
36
|
+
* put error triggers if delegates are passed non-primitives ([0a780bb](https://github.com/module-federation/nextjs-mf/commit/0a780bb07c9421b58605fc133f236a918ef5a0d8))
|
|
37
|
+
* remove dead code, use commonjs for delegate exports ([ad646d7](https://github.com/module-federation/nextjs-mf/commit/ad646d7306a2442ae6d9b2a72b33fb5ce66a9ba4))
|
|
38
|
+
* solve double async boundary ([88b3f4f](https://github.com/module-federation/nextjs-mf/commit/88b3f4f08b217e2f88b535ec9c7290bad697888b))
|
|
39
|
+
* solve externalization ([49f52e5](https://github.com/module-federation/nextjs-mf/commit/49f52e53ddddc990d31e6aa510d67dc0552a9d9a))
|
|
40
|
+
* support windows paths ([98ca26f](https://github.com/module-federation/nextjs-mf/commit/98ca26f3062b9fa67fc8ba8152fd85eda9b5df10))
|
|
41
|
+
* use EntryPlugin for injection of remotes ([e522c5a](https://github.com/module-federation/nextjs-mf/commit/e522c5ad2b7adcbd6c39f9c5fdb7a3e418277b7a))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* delegate module support ([76c9df3](https://github.com/module-federation/nextjs-mf/commit/76c9df3b97d60040466e9a01cfe3f45e8f9c6b78))
|
|
47
|
+
* delegate module support ([3567aa5](https://github.com/module-federation/nextjs-mf/commit/3567aa5f6d0a00ca6df103c796657eb8953bc96a))
|
|
48
|
+
* delegate module support ([8dd154c](https://github.com/module-federation/nextjs-mf/commit/8dd154c261b34183b12250ce204904cd3e085658))
|
|
49
|
+
* delegates part two ([1be2686](https://github.com/module-federation/nextjs-mf/commit/1be2686624798a7df9f447b48279294985b3f592))
|
|
50
|
+
* implement basic single runtime ([2432c3e](https://github.com/module-federation/nextjs-mf/commit/2432c3ec553759ca24d17a46b696c1123a86ec5a))
|
|
51
|
+
* implement module runtime hoisting ([17c5b2f](https://github.com/module-federation/nextjs-mf/commit/17c5b2fc5f67c4321959ae30a69742c3128bc9a5))
|
|
52
|
+
* improve automatic async boundary loader on single compile instance ([63fc327](https://github.com/module-federation/nextjs-mf/commit/63fc3273500d1626c7e8c4dab14268ae5cb9de7a))
|
|
53
|
+
* improve chunk correlation ([22d8afc](https://github.com/module-federation/nextjs-mf/commit/22d8afccff101044fcdeba390656950dbc6eafed))
|
|
54
|
+
* new chunk flushing system for exposed modules ([97a75d8](https://github.com/module-federation/nextjs-mf/commit/97a75d8702f2ddc5e12cff2ac4d24aca1df6f990))
|
|
55
|
+
* new next federation plugin ([7e096df](https://github.com/module-federation/nextjs-mf/commit/7e096df89682369cdc92095be6936b58b9b5787f))
|
|
56
|
+
* new output copy plugin for prod server exposure ([85da209](https://github.com/module-federation/nextjs-mf/commit/85da209103046567bdc93f71d421ea413ac1d37b))
|
|
57
|
+
* remove child compilers ([c124f37](https://github.com/module-federation/nextjs-mf/commit/c124f3797ad327971066a4ad75f0317531653c08))
|
|
58
|
+
* removing old promise template stuff from build utils ([d827cd6](https://github.com/module-federation/nextjs-mf/commit/d827cd60fc12bd65b4091db5f7e3d9b96bcdc12b))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### BREAKING CHANGES
|
|
62
|
+
|
|
63
|
+
* Plugin No longer uses child sidecars to create containers.
|
|
64
|
+
* deleting support for promiseTemplate
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
5
68
|
# [6.4.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.3.1...nextjs-mf-6.4.0) (2023-04-19)
|
|
6
69
|
|
|
7
70
|
|
|
@@ -15,6 +78,50 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/s
|
|
|
15
78
|
|
|
16
79
|
|
|
17
80
|
|
|
81
|
+
## [6.3.1-beta.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.3.0...nextjs-mf-6.3.1-beta.0) (2023-04-19)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Bug Fixes
|
|
85
|
+
|
|
86
|
+
* cache busting and async quirks when mixing delegates ([1fc6e67](https://github.com/module-federation/nextjs-mf/commit/1fc6e67ee33a3efb53ff59d2b3ac333f1d42a158))
|
|
87
|
+
* ensure app functions with async boundary loader ([717e885](https://github.com/module-federation/nextjs-mf/commit/717e88558475158bf1eb5ae88e53a3624b3277ff))
|
|
88
|
+
* get delegates working ([#527](https://github.com/module-federation/nextjs-mf/issues/527)) ([7655568](https://github.com/module-federation/nextjs-mf/commit/7655568fcef8dbfda40573deb5d3d029c101074c))
|
|
89
|
+
* improved asset pipeline ([63928b2](https://github.com/module-federation/nextjs-mf/commit/63928b28150c2c4e3adb9e14fb7aa54f5cf1578d))
|
|
90
|
+
* move delegate modules into both webpack runtimes ([0570021](https://github.com/module-federation/nextjs-mf/commit/0570021d1040888a9f00394e64f7530a22e74a75))
|
|
91
|
+
* move host remote reg into loader ([188b9e4](https://github.com/module-federation/nextjs-mf/commit/188b9e432b95ba4934a838a49571435ea27b4d0b))
|
|
92
|
+
* peer dependencies metadata ([b603587](https://github.com/module-federation/nextjs-mf/commit/b6035870e5130bfd5b5c70951cc17bb38a50fbdd))
|
|
93
|
+
* put error triggers if delegates are passed non-primitives ([0a780bb](https://github.com/module-federation/nextjs-mf/commit/0a780bb07c9421b58605fc133f236a918ef5a0d8))
|
|
94
|
+
* remove dead code, use commonjs for delegate exports ([ad646d7](https://github.com/module-federation/nextjs-mf/commit/ad646d7306a2442ae6d9b2a72b33fb5ce66a9ba4))
|
|
95
|
+
* solve double async boundary ([88b3f4f](https://github.com/module-federation/nextjs-mf/commit/88b3f4f08b217e2f88b535ec9c7290bad697888b))
|
|
96
|
+
* solve externalization ([49f52e5](https://github.com/module-federation/nextjs-mf/commit/49f52e53ddddc990d31e6aa510d67dc0552a9d9a))
|
|
97
|
+
* support windows paths ([98ca26f](https://github.com/module-federation/nextjs-mf/commit/98ca26f3062b9fa67fc8ba8152fd85eda9b5df10))
|
|
98
|
+
* use EntryPlugin for injection of remotes ([e522c5a](https://github.com/module-federation/nextjs-mf/commit/e522c5ad2b7adcbd6c39f9c5fdb7a3e418277b7a))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* delegate module support ([76c9df3](https://github.com/module-federation/nextjs-mf/commit/76c9df3b97d60040466e9a01cfe3f45e8f9c6b78))
|
|
104
|
+
* delegate module support ([3567aa5](https://github.com/module-federation/nextjs-mf/commit/3567aa5f6d0a00ca6df103c796657eb8953bc96a))
|
|
105
|
+
* delegate module support ([8dd154c](https://github.com/module-federation/nextjs-mf/commit/8dd154c261b34183b12250ce204904cd3e085658))
|
|
106
|
+
* delegates part two ([1be2686](https://github.com/module-federation/nextjs-mf/commit/1be2686624798a7df9f447b48279294985b3f592))
|
|
107
|
+
* implement basic single runtime ([2432c3e](https://github.com/module-federation/nextjs-mf/commit/2432c3ec553759ca24d17a46b696c1123a86ec5a))
|
|
108
|
+
* implement module runtime hoisting ([17c5b2f](https://github.com/module-federation/nextjs-mf/commit/17c5b2fc5f67c4321959ae30a69742c3128bc9a5))
|
|
109
|
+
* improve automatic async boundary loader on single compile instance ([63fc327](https://github.com/module-federation/nextjs-mf/commit/63fc3273500d1626c7e8c4dab14268ae5cb9de7a))
|
|
110
|
+
* improve chunk correlation ([22d8afc](https://github.com/module-federation/nextjs-mf/commit/22d8afccff101044fcdeba390656950dbc6eafed))
|
|
111
|
+
* new chunk flushing system for exposed modules ([97a75d8](https://github.com/module-federation/nextjs-mf/commit/97a75d8702f2ddc5e12cff2ac4d24aca1df6f990))
|
|
112
|
+
* new next federation plugin ([7e096df](https://github.com/module-federation/nextjs-mf/commit/7e096df89682369cdc92095be6936b58b9b5787f))
|
|
113
|
+
* new output copy plugin for prod server exposure ([85da209](https://github.com/module-federation/nextjs-mf/commit/85da209103046567bdc93f71d421ea413ac1d37b))
|
|
114
|
+
* remove child compilers ([c124f37](https://github.com/module-federation/nextjs-mf/commit/c124f3797ad327971066a4ad75f0317531653c08))
|
|
115
|
+
* removing old promise template stuff from build utils ([d827cd6](https://github.com/module-federation/nextjs-mf/commit/d827cd60fc12bd65b4091db5f7e3d9b96bcdc12b))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### BREAKING CHANGES
|
|
119
|
+
|
|
120
|
+
* Plugin No longer uses child sidecars to create containers.
|
|
121
|
+
* deleting support for promiseTemplate
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
18
125
|
# [6.3.0](https://github.com/module-federation/nextjs-mf/compare/nextjs-mf-6.2.3...nextjs-mf-6.3.0) (2023-04-10)
|
|
19
126
|
|
|
20
127
|
### 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: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/nextjs-mf",
|
|
3
|
-
"version": "6.4.0",
|
|
3
|
+
"version": "6.4.1-beta.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": "4.0.7",
|
|
22
21
|
"fast-glob": "3.2.12",
|
|
23
|
-
"node-fetch": "2.6.
|
|
22
|
+
"node-fetch": "2.6.9",
|
|
24
23
|
"webpack-sources": "3.2.3",
|
|
25
|
-
"@module-federation/
|
|
24
|
+
"@module-federation/node": "0.14.1",
|
|
25
|
+
"@module-federation/utilities": "1.7.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"next": "^12 || ^13",
|
|
@@ -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;IAEF,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"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delegate-hoist-container.js","sourceRoot":"","sources":["../../../../packages/nextjs-mf/src/delegate-hoist-container.js"],"names":[],"mappings":""}
|
package/src/index.d.ts
CHANGED
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
|
|
5
|
-
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
module.exports
|
|
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":"
|
|
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 +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,43 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+
export declare const DEFAULT_SHARE_SCOPE_BROWSER_LAZY: SharedObject;
|
|
21
|
+
/**
|
|
22
|
+
* Parses the remotes object, checking if they are using a custom promise template or not.
|
|
23
|
+
* If it's a custom promise template, the remote syntax is parsed to get the module name and version number.
|
|
24
|
+
*
|
|
25
|
+
* @param {Record<string, any>} remotes - The remotes object to be parsed.
|
|
26
|
+
* @returns {Record<string, string>} - The parsed remotes object.
|
|
27
|
+
*/
|
|
11
28
|
export declare const parseRemotes: (remotes: Record<string, any>) => Record<string, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the delegate modules from the remotes object.
|
|
31
|
+
*
|
|
32
|
+
* @param {Record<string, any>} remotes - The remotes object containing delegates.
|
|
33
|
+
* @returns {Record<string, string>} - The delegate modules from the remotes object.
|
|
34
|
+
*/
|
|
12
35
|
export declare const getDelegates: (remotes: Record<string, any>) => Record<string, string>;
|
|
36
|
+
/**
|
|
37
|
+
* Converts an array of Error objects into a single string with formatted error messages,
|
|
38
|
+
* separated by newline characters.
|
|
39
|
+
*
|
|
40
|
+
* @param {Error[]} err - The array of Error objects.
|
|
41
|
+
* @returns {string} - The combined formatted error messages as a single string.
|
|
42
|
+
*/
|
|
13
43
|
export declare const toDisplayErrors: (err: Error[]) => string;
|