@module-federation/node 2.1.0-canary.5 → 2.1.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 (76) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +191 -0
  3. package/dist/jest.config.js.map +1 -0
  4. package/dist/package.json +78 -0
  5. package/dist/src/filesystem/stratagies.d.ts +18 -0
  6. package/{src → dist/src}/filesystem/stratagies.js +22 -9
  7. package/dist/src/filesystem/stratagies.js.map +1 -0
  8. package/{src → dist/src}/index.d.ts +0 -2
  9. package/{src → dist/src}/index.js +1 -5
  10. package/dist/src/index.js.map +1 -0
  11. package/{src → dist/src}/plugins/AutomaticPublicPathPlugin.d.ts +1 -1
  12. package/{src → dist/src}/plugins/AutomaticPublicPathPlugin.js +3 -3
  13. package/dist/src/plugins/AutomaticPublicPathPlugin.js.map +1 -0
  14. package/dist/src/plugins/ChunkCorrelationPlugin.js.map +1 -0
  15. package/{src → dist/src}/plugins/CommonJsChunkLoadingPlugin.js +24 -23
  16. package/dist/src/plugins/CommonJsChunkLoadingPlugin.js.map +1 -0
  17. package/{src → dist/src}/plugins/DynamicFilesystemChunkLoadingRuntimeModule.d.ts +1 -1
  18. package/{src → dist/src}/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js +28 -56
  19. package/dist/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js.map +1 -0
  20. package/dist/src/plugins/EntryChunkTrackerPlugin.d.ts +13 -0
  21. package/dist/src/plugins/EntryChunkTrackerPlugin.js +41 -0
  22. package/dist/src/plugins/EntryChunkTrackerPlugin.js.map +1 -0
  23. package/{src → dist/src}/plugins/NodeFederationPlugin.d.ts +0 -20
  24. package/dist/src/plugins/NodeFederationPlugin.js +79 -0
  25. package/dist/src/plugins/NodeFederationPlugin.js.map +1 -0
  26. package/{src → dist/src}/plugins/RemotePublicPathRuntimeModule.d.ts +1 -1
  27. package/dist/src/plugins/RemotePublicPathRuntimeModule.js +132 -0
  28. package/dist/src/plugins/RemotePublicPathRuntimeModule.js.map +1 -0
  29. package/{src → dist/src}/plugins/StreamingTargetPlugin.d.ts +2 -2
  30. package/{src → dist/src}/plugins/StreamingTargetPlugin.js.map +1 -1
  31. package/{src → dist/src}/plugins/UniversalFederationPlugin.d.ts +1 -0
  32. package/{src → dist/src}/plugins/UniversalFederationPlugin.js +7 -3
  33. package/dist/src/plugins/UniversalFederationPlugin.js.map +1 -0
  34. package/{src → dist/src}/plugins/webpackChunkUtilities.d.ts +1 -1
  35. package/{src → dist/src}/plugins/webpackChunkUtilities.js +70 -89
  36. package/dist/src/plugins/webpackChunkUtilities.js.map +1 -0
  37. package/dist/src/types/index.js.map +1 -0
  38. package/{src → dist/src}/utils/flush-chunks.d.ts +2 -1
  39. package/{src → dist/src}/utils/flush-chunks.js +43 -33
  40. package/dist/src/utils/flush-chunks.js.map +1 -0
  41. package/{src → dist/src}/utils/hot-reload.d.ts +3 -3
  42. package/{src → dist/src}/utils/hot-reload.js +59 -17
  43. package/dist/src/utils/hot-reload.js.map +1 -0
  44. package/dist/src/utils/index.js.map +1 -0
  45. package/package.json +22 -18
  46. package/jest.config.js.map +0 -1
  47. package/src/filesystem/stratagies.d.ts +0 -11
  48. package/src/filesystem/stratagies.js.map +0 -1
  49. package/src/index.js.map +0 -1
  50. package/src/plugins/AutomaticPublicPathPlugin.js.map +0 -1
  51. package/src/plugins/ChunkCorrelationPlugin.js.map +0 -1
  52. package/src/plugins/CommonJsChunkLoadingPlugin.js.map +0 -1
  53. package/src/plugins/DynamicFilesystemChunkLoadingRuntimeModule.js.map +0 -1
  54. package/src/plugins/NodeContainerPlugin.d.ts +0 -57
  55. package/src/plugins/NodeContainerPlugin.js +0 -105
  56. package/src/plugins/NodeContainerPlugin.js.map +0 -1
  57. package/src/plugins/NodeFederationPlugin.js +0 -127
  58. package/src/plugins/NodeFederationPlugin.js.map +0 -1
  59. package/src/plugins/RemotePublicPathRuntimeModule.js +0 -109
  60. package/src/plugins/RemotePublicPathRuntimeModule.js.map +0 -1
  61. package/src/plugins/UniversalFederationPlugin.js.map +0 -1
  62. package/src/plugins/webpackChunkUtilities.js.map +0 -1
  63. package/src/types/index.js.map +0 -1
  64. package/src/utils/flush-chunks.js.map +0 -1
  65. package/src/utils/hot-reload.js.map +0 -1
  66. package/src/utils/index.js.map +0 -1
  67. package/{jest.config.d.ts → dist/jest.config.d.ts} +0 -0
  68. package/{jest.config.js → dist/jest.config.js} +0 -0
  69. package/{src → dist/src}/plugins/ChunkCorrelationPlugin.d.ts +6 -6
  70. /package/{src → dist/src}/plugins/ChunkCorrelationPlugin.js +0 -0
  71. /package/{src → dist/src}/plugins/CommonJsChunkLoadingPlugin.d.ts +0 -0
  72. /package/{src → dist/src}/plugins/StreamingTargetPlugin.js +0 -0
  73. /package/{src → dist/src}/types/index.d.ts +0 -0
  74. /package/{src → dist/src}/types/index.js +0 -0
  75. /package/{src → dist/src}/utils/index.d.ts +0 -0
  76. /package/{src → dist/src}/utils/index.js +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 ScriptedAlchemy LLC (Zack Jackson)
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,191 @@
1
+ <p align="center">
2
+ <img src="https://github.com/module-federation/nextjs-mf/blob/main/packages/node/assets/banner.png" width="800"/>
3
+ </p>
4
+ <div align="center">
5
+ <!-- for version -->
6
+ <img src="https://img.shields.io/npm/v/@module-federation/node" alt="version" >
7
+ <img src="https://img.shields.io/npm/l/@module-federation/node.svg?" alt="license" >
8
+ <!-- for downloads -->
9
+ <img src="https://img.shields.io/npm/dt/@module-federation/node" alt="downloads">
10
+ </div>
11
+
12
+ <p align="center">
13
+ <strong>A package to bring the concept and power of module federation to NodeJS.</strong>
14
+ </p>
15
+
16
+ ## ⚡ Features
17
+
18
+ - Exposes two Webpack Plugins to enable Module Federation.
19
+ - Can exported as UniversalFederationPlugin or NodeFederationPlugin with StreamingTargetPlugin
20
+ - Allows server to fetch chunks across the network.
21
+ - Allow distributed deployments of federated applications.
22
+
23
+ ## 📦 Installation
24
+
25
+ To install the plugin run one of the following commands in your terminal for your application.
26
+
27
+ ```bash
28
+ # npm
29
+ npm install @module-federation/node
30
+
31
+ # yarn
32
+ yarn add @module-federation/node
33
+ ```
34
+
35
+ ## 🚀 Usage
36
+
37
+ There are two approaches to using the plugins exported from this package, dependent on your use case.
38
+
39
+ ### UniversalFederationPlugin
40
+
41
+ This plugin is an abstraction over both `NodeFederationPlugin` and `ModuleFederationPlugin`. It will alternate between which it uses based on where the build is intended to be used.
42
+
43
+ If the build is intended to be used on the `browser`, it will use the standard `ModuleFederationPlugin` and bundle your code accordingly, however, if it is intended for `server` usage, it will use `NodeFederationPlugin` to create the bundle.
44
+
45
+ This simplifies the code required in your `webpack.config.js` to enable SSR Module Federation. It determines which platform it needs to build for based on two things:
46
+
47
+ 1. If the options passed to the plugin has specified `isServer: true`
48
+ 2. If the name assigned to the config being used is `server`
49
+
50
+ It accepts the other standard options from `ModuleFederationPlugin` as well. You can see an example usage below:
51
+
52
+ ```js
53
+ const { UniversalFederationPlugin } = require('@module-federation/node');
54
+
55
+ const config = {
56
+ target: isServer ? false : 'web',
57
+ plugins: [
58
+ new UniversalFederationPlugin({
59
+ name: 'website2',
60
+ library: { type: 'commonjs-module' },
61
+ isServer: true, // or false
62
+ remotes: {},
63
+ filename: 'remoteEntry.js',
64
+ exposes: {
65
+ './SharedComponent': './remoteServer/SharedComponent',
66
+ },
67
+ }),
68
+ ],
69
+ };
70
+ ```
71
+
72
+ ### NodeFederationPlugin and StreamingTargetPlugin
73
+
74
+ You can also use each of the underlying plugins individually if you need more control over when they are used.
75
+
76
+ At build time, you need to be aware if you're building for the `server` or for the `browser`.
77
+ If it's building for server, we need to set `target: false` to allow the plugins to function correctly.
78
+
79
+ The `NodeFederationPlugin` follows the same API as the [Module Federation Plugin](https://webpack.js.org/plugins/module-federation-plugin) and therefore should be a drop-in replacement if you already have it set up in your `webpack.config.js`.
80
+
81
+ ### 🔧 Config Example
82
+
83
+ An example configuration is presented below:
84
+
85
+ ```js
86
+ const { NodeFederationPlugin, StreamingTargetPlugin } = require('@module-federation/node');
87
+
88
+ const config = {
89
+ target: isServer ? false : 'web',
90
+ plugins: [
91
+ new NodeFederationPlugin({
92
+ name: 'website2',
93
+ library: { type: 'commonjs-module' },
94
+ remotes: {},
95
+ filename: 'remoteEntry.js',
96
+ exposes: {
97
+ './SharedComponent': './remoteServer/SharedComponent',
98
+ },
99
+ }),
100
+ new StreamingTargetPlugin({
101
+ name: 'website2',
102
+ library: { type: 'commonjs-module' },
103
+ remotes: {},
104
+ }),
105
+ ],
106
+ };
107
+ ```
108
+
109
+ ## Utilities
110
+
111
+ This package also exposes a few utilities to help with the setup of your federated application.
112
+
113
+ ### revalidate
114
+
115
+ Used to "hot reload" the federated application.
116
+
117
+ - This is useful when you're developing your federated application and want to see changes without having to restart the server.
118
+ - Also useful for production environments where you want to be able to update the federated application without having to restart the server.
119
+
120
+ ```js
121
+ import { revalidate } from '@module-federation/node/utils';
122
+
123
+ // we automatically reset require cache, so the reload callback is only if you need to do something else
124
+ revalidate().then((shouldReload) => {
125
+ // do something extra after revalidation
126
+ if (shouldReload) {
127
+ // reload the server
128
+ }
129
+ });
130
+ ```
131
+
132
+ _Note_: To ensure that changes made to files in remotes are picked up `revalidate`, you can set the remotes webpack [output.filename](https://webpack.js.org/configuration/output/#outputfilename) to `[name]-[contenthash].js` (or similar). This will cause the remoteEntry.js file to be regenerated with a unique hash every time a new build occurs. The revalidate method intelligently detects changes by comparing the hashes of the remoteEntry.js files. By incorporating [contenthash] into the remote's webpack configuration, you enable the shell to seamlessly incorporate the updated files from the remotes.
133
+
134
+ **Hot reloading Express.js**
135
+
136
+ Express has its own route stack, so reloading require cache will not be enough to reload the routes inside express.
137
+
138
+ ```js
139
+ //express.js
140
+ const app = express();
141
+
142
+ global.clearRoutes = () => {
143
+ app._router.stack = app._router.stack.filter((k) => !(k && k.route && k.route.path));
144
+ };
145
+
146
+ // in some other file (within the scope of webpack build)
147
+ // wherever you have your revalidation logic
148
+ revalidate().then((shouldReload) => {
149
+ if (shouldReload) {
150
+ global.clearRoutes();
151
+ }
152
+ });
153
+ ```
154
+
155
+ ### Overriding default http chunk fetch
156
+
157
+ ```js
158
+ const chunkFetcher = globalThis.webpackChunkLoad || globalThis.fetch || fetchPolyfill;
159
+ // then it will pass one argument to the function, the url to fetch
160
+
161
+ chunkFetcher(url)
162
+ .then((res) => res.text())
163
+ .then((text) => {
164
+ // do something with the text
165
+ });
166
+ ```
167
+
168
+ If you want to use your own custom fetch, or add fetch headers, either in the entrypoint of webpack or outside of webpack scope, like in express server you can override the default chunk fetcher by setting the `globalThis.webpackChunkLoad` variable.
169
+
170
+ ```js
171
+ globalThis.webpackChunkLoad = async (url) => {
172
+ const res = await fetch(url, {
173
+ headers: {
174
+ 'x-custom-header': 'custom-header-value',
175
+ },
176
+ });
177
+ return res.text();
178
+ };
179
+ ```
180
+
181
+ ## 🔑 License
182
+
183
+ - MIT @[ScriptedAlchemy](https://github.com/ScriptedAlchemy)
184
+
185
+ ## 👨‍💻 Contributors
186
+
187
+ List of our amazing contributors 💥
188
+
189
+ <a href="https://github.com/module-federation/nextjs-mf/graphs/contributors">
190
+ <img src="https://contrib.rocks/image?repo=module-federation/node" />
191
+ </a>
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../jest.config.js"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,MAAM,CAAC,OAAO,GAAG;IACf,WAAW,EAAE,MAAM;IACnB,MAAM,EAAE,sBAAsB;IAC9B,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,MAAM;IACvB,SAAS,EAAE;QACT,cAAc,EAAE;YACd,SAAS;YACT;gBACE,QAAQ,EAAE,8BAA8B;aACzC;SACF;KACF;IACD,oBAAoB,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1C,iBAAiB,EAAE,8BAA8B;CAClD,CAAC"}
@@ -0,0 +1,78 @@
1
+ {
2
+ "public": true,
3
+ "name": "@module-federation/node",
4
+ "version": "2.1.0",
5
+ "type": "commonjs",
6
+ "main": "./src/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./dist/src/index.js",
10
+ "require": "./dist/src/index.js"
11
+ },
12
+ "./package.json": "./package.json",
13
+ "./utils": {
14
+ "import": "./dist/src/utils/index.js",
15
+ "require": "./dist/src/utils/index.js"
16
+ },
17
+ "./src/plugins/RemotePublicPathPlugin.js": "./dist/src/plugins/RemotePublicPathPlugin.js",
18
+ "./src/plugins/NodeFederationPlugin.js": "./dist/src/plugins/NodeFederationPlugin.js",
19
+ "./src/": "./dist/src/"
20
+ },
21
+ "files": [
22
+ "dist/",
23
+ "README.md"
24
+ ],
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "tags": [
29
+ "module-federation",
30
+ "node",
31
+ "webpack",
32
+ "node-federation",
33
+ "node-module-federation",
34
+ "ssr"
35
+ ],
36
+ "types": "src/index.d.ts",
37
+ "description": "Module Federation helper for Node",
38
+ "repository": "https://github.com/module-federation/universe/tree/main/packages/node",
39
+ "author": "Zack Jackson <zackary.l.jackson@gmail.com>",
40
+ "license": "MIT",
41
+ "dependencies": {
42
+ "@module-federation/enhanced": "workspace:*",
43
+ "@module-federation/runtime": "workspace:*",
44
+ "@module-federation/runtime-tools": "0.0.8",
45
+ "@module-federation/sdk": "workspace:*",
46
+ "@module-federation/utilities": "workspace:*",
47
+ "@module-federation/webpack-bundler-runtime": "0.0.8",
48
+ "chalk": "3.0.0",
49
+ "encoding": "^0.1.13",
50
+ "find-pkg": "2.0.0",
51
+ "fs-extra": "9.1.0",
52
+ "node-fetch": "2.7.0",
53
+ "semver": "6.3.1",
54
+ "tapable": "2.2.1",
55
+ "upath": "2.0.1",
56
+ "url": "0.11.3",
57
+ "webpack-sources": "3.2.3",
58
+ "@module-federation/managers": "0.1.0",
59
+ "@module-federation/manifest": "0.1.0"
60
+ },
61
+ "peerDependencies": {
62
+ "next": "^12||^13",
63
+ "react": "^16||^17||^18",
64
+ "react-dom": "^16||^17||^18",
65
+ "webpack": "^5.40.0"
66
+ },
67
+ "peerDependenciesMeta": {
68
+ "next": {
69
+ "optional": true
70
+ },
71
+ "react": {
72
+ "optional": true
73
+ },
74
+ "react-dom": {
75
+ "optional": true
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,18 @@
1
+ export declare function fileSystemRunInContextStrategy(chunkId: string, rootOutputDir: string, remotes: Remotes, callback: CallbackFunction): Promise<void>;
2
+ export declare function httpEvalStrategy(chunkName: string, remoteName: string, remotes: Remotes, callback: CallbackFunction): Promise<void>;
3
+ interface Remotes {
4
+ [key: string]: {
5
+ entry: string;
6
+ };
7
+ }
8
+ type CallbackFunction = (error: Error | null, chunk?: any) => void;
9
+ /**
10
+ * HttpVmStrategy
11
+ * This function is used to execute a chunk of code in a VM using HTTP or HTTPS based on the protocol.
12
+ * @param {string} chunkName - The name of the chunk to be executed.
13
+ * @param {string} remoteName - The name of the remote server.
14
+ * @param {Remotes} remotes - An object containing the remote servers.
15
+ * @param {CallbackFunction} callback - A callback function to be executed after the chunk is executed.
16
+ */
17
+ export declare function httpVmStrategy(chunkName: string, remoteName: string, remotes: Remotes, callback: CallbackFunction): Promise<void>;
18
+ export {};
@@ -39,7 +39,7 @@ async function httpEvalStrategy(chunkName, remoteName, remotes, callback) {
39
39
  url = new URL(chunkName, __webpack_require__.p);
40
40
  }
41
41
  catch (e) {
42
- console.error('module-federation: failed to construct absolute chunk path of', remoteName, 'for', chunkName, e);
42
+ console.error('module-federation: failed to construct absolute chunk path of', remoteName, 'for', chunkName);
43
43
  url = new URL(remotes[remoteName]);
44
44
  const getBasenameFromUrl = (url) => {
45
45
  const urlParts = url.split('/');
@@ -52,7 +52,7 @@ async function httpEvalStrategy(chunkName, remoteName, remotes, callback) {
52
52
  const chunk = {};
53
53
  try {
54
54
  const urlDirname = url.pathname.split('/').slice(0, -1).join('/');
55
- eval('(function(exports, require, __dirname, __filename) {' + data + '\n})', chunkName)(chunk, require, urlDirname, chunkName);
55
+ eval('(function(exports, require, __dirname, __filename) {' + data + '\n})')(chunk, require, urlDirname, chunkName);
56
56
  callback(null, chunk);
57
57
  }
58
58
  catch (e) {
@@ -65,8 +65,8 @@ exports.httpEvalStrategy = httpEvalStrategy;
65
65
  * This function is used to execute a chunk of code in a VM using HTTP or HTTPS based on the protocol.
66
66
  * @param {string} chunkName - The name of the chunk to be executed.
67
67
  * @param {string} remoteName - The name of the remote server.
68
- * @param {object} remotes - An object containing the remote servers.
69
- * @param {function} callback - A callback function to be executed after the chunk is executed.
68
+ * @param {Remotes} remotes - An object containing the remote servers.
69
+ * @param {CallbackFunction} callback - A callback function to be executed after the chunk is executed.
70
70
  */
71
71
  async function httpVmStrategy(chunkName, remoteName, remotes, callback) {
72
72
  const http = require('http');
@@ -74,25 +74,38 @@ async function httpVmStrategy(chunkName, remoteName, remotes, callback) {
74
74
  const vm = require('vm');
75
75
  const path = require('path');
76
76
  let url;
77
+ const globalThisVal = new Function('return globalThis')();
77
78
  try {
78
79
  url = new URL(chunkName, __webpack_require__.p);
79
80
  }
80
81
  catch (e) {
81
- console.error('module-federation: failed to construct absolute chunk path of', remoteName, 'for', chunkName, e);
82
- url = new URL(remotes._config[remoteName]);
82
+ console.error('module-federation: failed to construct absolute chunk path of', remoteName, 'for', chunkName);
83
+ // search all instances to see if any have the remote
84
+ const container = globalThisVal['__FEDERATION__']['__INSTANCES__'].find((instance) => {
85
+ if (!instance.moduleCache.has(remoteName))
86
+ return;
87
+ const container = instance.moduleCache.get(remoteName);
88
+ if (!container.remoteInfo)
89
+ return;
90
+ return container.remoteInfo.entry;
91
+ });
92
+ if (!container) {
93
+ throw new Error('Container not found');
94
+ }
95
+ url = new URL(container.moduleCache.get(remoteName).remoteInfo.entry);
83
96
  const fileToReplace = path.basename(url.pathname);
84
97
  url.pathname = url.pathname.replace(fileToReplace, chunkName);
85
98
  }
86
99
  const protocol = url.protocol === 'https:' ? https : http;
87
- protocol.get(url, (res) => {
100
+ protocol.get(url.href, (res) => {
88
101
  let data = '';
89
102
  res.on('data', (chunk) => {
90
- data += chunk;
103
+ data += chunk.toString();
91
104
  });
92
105
  res.on('end', () => {
93
106
  const chunk = {};
94
107
  const urlDirname = url.pathname.split('/').slice(0, -1).join('/');
95
- vm.runInThisContext('(function(exports, require, __dirname, __filename) {' + data + '\n})', chunkName)(chunk, require, urlDirname, chunkName);
108
+ vm.runInThisContext(`(function(exports, require, __dirname, __filename) {${data}\n})`, chunkName)(chunk, require, urlDirname, chunkName);
96
109
  callback(null, chunk);
97
110
  });
98
111
  res.on('error', (err) => {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stratagies.js","sourceRoot":"","sources":["../../../src/filesystem/stratagies.ts"],"names":[],"mappings":";;;AAAA,aAAa;AACN,KAAK,UAAU,8BAA8B,CA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AAC;QACxB,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACtB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AA7DD,wCA6DC"}
@@ -3,5 +3,3 @@ export { default as NodeFederationPlugin } from './plugins/NodeFederationPlugin'
3
3
  export { default as UniversalFederationPlugin } from './plugins/UniversalFederationPlugin';
4
4
  export { default as ChunkCorrelationPlugin } from './plugins/ChunkCorrelationPlugin';
5
5
  export { default as RemotePublicPathPlugin } from './plugins/RemotePublicPathRuntimeModule';
6
- export { default as NodeContainerPlugin } from './plugins/NodeContainerPlugin';
7
- export { parseRemotes } from './plugins/NodeFederationPlugin';
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseRemotes = exports.NodeContainerPlugin = exports.RemotePublicPathPlugin = exports.ChunkCorrelationPlugin = exports.UniversalFederationPlugin = exports.NodeFederationPlugin = exports.StreamingTargetPlugin = void 0;
6
+ exports.RemotePublicPathPlugin = exports.ChunkCorrelationPlugin = exports.UniversalFederationPlugin = exports.NodeFederationPlugin = exports.StreamingTargetPlugin = void 0;
7
7
  var StreamingTargetPlugin_1 = require("./plugins/StreamingTargetPlugin");
8
8
  Object.defineProperty(exports, "StreamingTargetPlugin", { enumerable: true, get: function () { return __importDefault(StreamingTargetPlugin_1).default; } });
9
9
  var NodeFederationPlugin_1 = require("./plugins/NodeFederationPlugin");
@@ -14,8 +14,4 @@ var ChunkCorrelationPlugin_1 = require("./plugins/ChunkCorrelationPlugin");
14
14
  Object.defineProperty(exports, "ChunkCorrelationPlugin", { enumerable: true, get: function () { return __importDefault(ChunkCorrelationPlugin_1).default; } });
15
15
  var RemotePublicPathRuntimeModule_1 = require("./plugins/RemotePublicPathRuntimeModule");
16
16
  Object.defineProperty(exports, "RemotePublicPathPlugin", { enumerable: true, get: function () { return __importDefault(RemotePublicPathRuntimeModule_1).default; } });
17
- var NodeContainerPlugin_1 = require("./plugins/NodeContainerPlugin");
18
- Object.defineProperty(exports, "NodeContainerPlugin", { enumerable: true, get: function () { return __importDefault(NodeContainerPlugin_1).default; } });
19
- var NodeFederationPlugin_2 = require("./plugins/NodeFederationPlugin");
20
- Object.defineProperty(exports, "parseRemotes", { enumerable: true, get: function () { return NodeFederationPlugin_2.parseRemotes; } });
21
17
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,yEAAmF;AAA1E,+IAAA,OAAO,OAAyB;AACzC,uEAAiF;AAAxE,6IAAA,OAAO,OAAwB;AACxC,iFAA2F;AAAlF,uJAAA,OAAO,OAA6B;AAC7C,2EAAqF;AAA5E,iJAAA,OAAO,OAA0B;AAC1C,yFAA4F;AAAnF,wJAAA,OAAO,OAA0B"}
@@ -1,4 +1,4 @@
1
- import { Compiler } from 'webpack';
1
+ import type { Compiler } from 'webpack';
2
2
  interface PluginOptions {
3
3
  }
4
4
  declare class RemotePublicPathPlugin {
@@ -3,16 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const webpack_1 = require("webpack");
7
6
  const RemotePublicPathRuntimeModule_1 = __importDefault(require("./RemotePublicPathRuntimeModule"));
8
7
  class RemotePublicPathPlugin {
9
8
  constructor(options) {
10
9
  this.options = options;
11
10
  }
12
11
  apply(compiler) {
12
+ const { RuntimeGlobals } = compiler.webpack;
13
13
  compiler.hooks.thisCompilation.tap('RemotePublicPathPlugin', (compilation) => {
14
14
  compilation.hooks.runtimeRequirementInTree
15
- .for(webpack_1.RuntimeGlobals.publicPath)
15
+ .for(RuntimeGlobals.publicPath)
16
16
  .tap('RuntimePlugin', (chunk, set) => {
17
17
  const { outputOptions } = compilation;
18
18
  const { publicPath: globalPublicPath, scriptType } = outputOptions;
@@ -22,7 +22,7 @@ class RemotePublicPathPlugin {
22
22
  : globalPublicPath;
23
23
  const module = new RemotePublicPathRuntimeModule_1.default(this.options);
24
24
  if (publicPath === 'auto' && scriptType !== 'module') {
25
- set.add(webpack_1.RuntimeGlobals.global);
25
+ set.add(RuntimeGlobals.global);
26
26
  }
27
27
  else if (typeof publicPath !== 'string' ||
28
28
  /\[(full)?hash\]/.test(publicPath)) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutomaticPublicPathPlugin.js","sourceRoot":"","sources":["../../../src/plugins/AutomaticPublicPathPlugin.ts"],"names":[],"mappings":";;;;;AAEA,oGAA4E;AAI5E,MAAM,sBAAsB;IAG1B,YAAY,OAAuB;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAkB;QACtB,MAAM,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC5C,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAChC,wBAAwB,EACxB,CAAC,WAAW,EAAE,EAAE;YACd,WAAW,CAAC,KAAK,CAAC,wBAAwB;iBACvC,GAAG,CAAC,cAAc,CAAC,UAAU,CAAC;iBAC9B,GAAG,CAAC,eAAe,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;gBACnC,MAAM,EAAE,aAAa,EAAE,GAAG,WAAW,CAAC;gBACtC,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC;gBACnE,MAAM,YAAY,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;gBAC7C,MAAM,UAAU,GACd,YAAY,IAAI,YAAY,CAAC,UAAU,KAAK,SAAS;oBACnD,CAAC,C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AM,KAAK,GAAG,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBAE7C,+FAA+F;oBAC/F,IAAI,KAAK,EAAE,CAAC;wBACV,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;oBACjD,CAAC;yBAAM,CAAC;wBACN,WAAW,CAAC,SAAS,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;oBAC/C,CAAC;gBACH,CAAC;YACH,CAAC,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,GAAG,qBAAqB,CAAC"}
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const RuntimeGlobals_1 = __importDefault(require("webpack/lib/RuntimeGlobals"));
7
- const StartupChunkDependenciesPlugin_1 = __importDefault(require("webpack/lib/runtime/StartupChunkDependenciesPlugin"));
6
+ const normalize_webpack_path_1 = require("@module-federation/sdk/normalize-webpack-path");
7
+ const StartupChunkDependenciesPlugin = require((0, normalize_webpack_path_1.normalizeWebpackPath)('webpack/lib/runtime/StartupChunkDependenciesPlugin'));
8
8
  const DynamicFilesystemChunkLoadingRuntimeModule_1 = __importDefault(require("./DynamicFilesystemChunkLoadingRuntimeModule"));
9
9
  const RemotePublicPathRuntimeModule_1 = __importDefault(require("./RemotePublicPathRuntimeModule"));
10
10
  class DynamicFilesystemChunkLoadingPlugin {
@@ -13,10 +13,11 @@ class DynamicFilesystemChunkLoadingPlugin {
13
13
  this._asyncChunkLoading = this.options.asyncChunkLoading;
14
14
  }
15
15
  apply(compiler) {
16
+ const { RuntimeGlobals } = compiler.webpack;
16
17
  const chunkLoadingValue = this._asyncChunkLoading
17
18
  ? 'async-node'
18
19
  : 'require';
19
- new StartupChunkDependenciesPlugin_1.default({
20
+ new StartupChunkDependenciesPlugin({
20
21
  chunkLoading: chunkLoadingValue,
21
22
  asyncChunkLoading: this._asyncChunkLoading,
22
23
  //@ts-ignore
@@ -34,60 +35,60 @@ class DynamicFilesystemChunkLoadingPlugin {
34
35
  if (!isEnabledForChunk(chunk)) {
35
36
  return;
36
37
  }
37
- set.add(RuntimeGlobals_1.default.moduleFactoriesAddOnly);
38
- set.add(RuntimeGlobals_1.default.hasOwnProperty);
39
- set.add(RuntimeGlobals_1.default.publicPath); // this breaks things
38
+ set.add(RuntimeGlobals.moduleFactoriesAddOnly);
39
+ set.add(RuntimeGlobals.hasOwnProperty);
40
+ set.add(RuntimeGlobals.publicPath); // this breaks things
40
41
  compilation.addRuntimeModule(chunk, new DynamicFilesystemChunkLoadingRuntimeModule_1.default(set, this.options, {
41
42
  webpack: compiler.webpack,
42
43
  }));
43
44
  };
44
45
  compilation.hooks.runtimeRequirementInTree
45
- .for(RuntimeGlobals_1.default.ensureChunkHandlers)
46
+ .for(RuntimeGlobals.ensureChunkHandlers)
46
47
  .tap('DynamicFilesystemChunkLoadingPlugin', handler);
47
48
  compilation.hooks.runtimeRequirementInTree
48
- .for(RuntimeGlobals_1.default.hmrDownloadUpdateHandlers)
49
+ .for(RuntimeGlobals.hmrDownloadUpdateHandlers)
49
50
  .tap('DynamicFilesystemChunkLoadingPlugin', handler);
50
51
  compilation.hooks.runtimeRequirementInTree
51
- .for(RuntimeGlobals_1.default.hmrDownloadManifest)
52
+ .for(RuntimeGlobals.hmrDownloadManifest)
52
53
  .tap('DynamicFilesystemChunkLoadingPlugin', handler);
53
54
  compilation.hooks.runtimeRequirementInTree
54
- .for(RuntimeGlobals_1.default.baseURI)
55
+ .for(RuntimeGlobals.baseURI)
55
56
  .tap('DynamicFilesystemChunkLoadingPlugin', handler);
56
57
  compilation.hooks.runtimeRequirementInTree
57
- .for(RuntimeGlobals_1.default.externalInstallChunk)
58
+ .for(RuntimeGlobals.externalInstallChunk)
58
59
  .tap('DynamicFilesystemChunkLoadingPlugin', handler);
59
60
  compilation.hooks.runtimeRequirementInTree
60
- .for(RuntimeGlobals_1.default.onChunksLoaded)
61
+ .for(RuntimeGlobals.onChunksLoaded)
61
62
  .tap('DynamicFilesystemChunkLoadingPlugin', handler);
62
63
  compilation.hooks.runtimeRequirementInTree
63
- .for(RuntimeGlobals_1.default.ensureChunkHandlers)
64
+ .for(RuntimeGlobals.ensureChunkHandlers)
64
65
  .tap('DynamicFilesystemChunkLoadingPlugin', (chunk, set) => {
65
66
  if (!isEnabledForChunk(chunk)) {
66
67
  return;
67
68
  }
68
- set.add(RuntimeGlobals_1.default.getChunkScriptFilename);
69
+ set.add(RuntimeGlobals.getChunkScriptFilename);
69
70
  });
70
71
  compilation.hooks.runtimeRequirementInTree
71
- .for(RuntimeGlobals_1.default.hmrDownloadUpdateHandlers)
72
+ .for(RuntimeGlobals.hmrDownloadUpdateHandlers)
72
73
  .tap('DynamicFilesystemChunkLoadingPlugin', (chunk, set) => {
73
74
  if (!isEnabledForChunk(chunk)) {
74
75
  return;
75
76
  }
76
- set.add(RuntimeGlobals_1.default.getChunkUpdateScriptFilename);
77
- set.add(RuntimeGlobals_1.default.moduleCache);
78
- set.add(RuntimeGlobals_1.default.hmrModuleData);
79
- set.add(RuntimeGlobals_1.default.moduleFactoriesAddOnly);
77
+ set.add(RuntimeGlobals.getChunkUpdateScriptFilename);
78
+ set.add(RuntimeGlobals.moduleCache);
79
+ set.add(RuntimeGlobals.hmrModuleData);
80
+ set.add(RuntimeGlobals.moduleFactoriesAddOnly);
80
81
  });
81
82
  compilation.hooks.runtimeRequirementInTree
82
- .for(RuntimeGlobals_1.default.hmrDownloadManifest)
83
+ .for(RuntimeGlobals.hmrDownloadManifest)
83
84
  .tap('DynamicFilesystemChunkLoadingPlugin', (chunk, set) => {
84
85
  if (!isEnabledForChunk(chunk)) {
85
86
  return;
86
87
  }
87
- set.add(RuntimeGlobals_1.default.getUpdateManifestFilename);
88
+ set.add(RuntimeGlobals.getUpdateManifestFilename);
88
89
  });
89
90
  compilation.hooks.runtimeRequirementInTree
90
- .for(RuntimeGlobals_1.default.publicPath)
91
+ .for(RuntimeGlobals.publicPath)
91
92
  .tap('RuntimePlugin', (chunk, set) => {
92
93
  const { outputOptions } = compilation;
93
94
  const { publicPath: globalPublicPath, scriptType } = outputOptions;
@@ -97,7 +98,7 @@ class DynamicFilesystemChunkLoadingPlugin {
97
98
  : globalPublicPath;
98
99
  const module = new RemotePublicPathRuntimeModule_1.default(this.options);
99
100
  if (publicPath === 'auto' && scriptType !== 'module') {
100
- set.add(RuntimeGlobals_1.default.global);
101
+ set.add(RuntimeGlobals.global);
101
102
  }
102
103
  else if (typeof publicPath !== 'string' ||
103
104
  /\[(full)?hash\]/.test(publicPath)) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonJsChunkLoadingPlugin.js","sourceRoot":"","sources":["../../../src/plugins/CommonJsChunkLoadingPlugin.ts"],"names":[],"mappings":";;;;;AACA,0FAAqF;AAErF,MAAM,8BAA8B,GAAG,OAAO,CAC5C,IAAA,6CAAoB,EAAC,oDAAoD,CAAC,CACJ,CAAC;AACzE,8HAAqF;AACrF,oGAA0E;AAY1E,MAAM,mCAAmC;IAIvC,YAAY,OAA6C;QACvD,IAAI,CAAC,OAAO,GAAG,OAAO,IAAK,EAA2C,CAAC;QACvE,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,QAAkB;QACtB,MAAM,EAAE,cAAc,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC;QAC5C,MAAM,iBAAiB,GAAG,IAAI,CAAC,kBAAkB;YAC/C,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,SAAS,CAAC;QAEd,IAAI,8BAA8B,CAAC;YACjC,YAAY,EAAE,iBAAiB;YAC/B,iBAAiB,EAAE,IAAI,CAAC,kBAAkB;YAC1C,YAAY;SACb,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE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,GAAG,IAAI,CAAC;gBACzB,CAAC;gBAED,WAAW,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC5C,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;YAEL,WAAW,CAAC,KAAK,CAAC,iCAAiC,CAAC,GAAG,CACrD,gCAAgC,EAChC,CACE,KAAY,EACZ,GAAgB,EAChB,EAAE,UAAU,EAA8B,EAC1C,EAAE;gBACF,gCAAgC;gBAChC,WAAW;gBACX,iBAAiB;gBACjB,6CAA6C;gBAC7C,KAAK;YACP,CAAC,CACF,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AAED,kBAAe,mCAAmC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Chunk, Compiler } from 'webpack';
2
- import { RuntimeModule } from 'webpack';
2
+ declare const RuntimeModule: typeof import("webpack").RuntimeModule;
3
3
  import { SyncWaterfallHook } from 'tapable';
4
4
  interface DynamicFilesystemChunkLoadingRuntimeModuleOptions {
5
5
  baseURI: Compiler['options']['output']['publicPath'];