diff --git a/advanced-api/automatic-vendor-sharing/app1/package.json b/advanced-api/automatic-vendor-sharing/app1/package.json
index e2d26bdf2e0..862c305bf54 100644
--- a/advanced-api/automatic-vendor-sharing/app1/package.json
+++ b/advanced-api/automatic-vendor-sharing/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/advanced-api/automatic-vendor-sharing/app1/public/index.html b/advanced-api/automatic-vendor-sharing/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/advanced-api/automatic-vendor-sharing/app1/public/index.html
+++ b/advanced-api/automatic-vendor-sharing/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/advanced-api/automatic-vendor-sharing/app1/webpack.config.js b/advanced-api/automatic-vendor-sharing/app1/webpack.config.js
index c22e67f2835..7902adb3c38 100644
--- a/advanced-api/automatic-vendor-sharing/app1/webpack.config.js
+++ b/advanced-api/automatic-vendor-sharing/app1/webpack.config.js
@@ -38,10 +38,9 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
filename: "remoteEntry.js",
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
exposes: {
"./Button": "./src/Button",
diff --git a/advanced-api/automatic-vendor-sharing/app2/package.json b/advanced-api/automatic-vendor-sharing/app2/package.json
index 98e5e165341..dafe0024e9c 100644
--- a/advanced-api/automatic-vendor-sharing/app2/package.json
+++ b/advanced-api/automatic-vendor-sharing/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/advanced-api/automatic-vendor-sharing/app2/public/index.html b/advanced-api/automatic-vendor-sharing/app2/public/index.html
index dea6b023494..19f0d60626e 100644
--- a/advanced-api/automatic-vendor-sharing/app2/public/index.html
+++ b/advanced-api/automatic-vendor-sharing/app2/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/advanced-api/automatic-vendor-sharing/app2/webpack.config.js b/advanced-api/automatic-vendor-sharing/app2/webpack.config.js
index 82857841e4d..2d02b3b1c24 100644
--- a/advanced-api/automatic-vendor-sharing/app2/webpack.config.js
+++ b/advanced-api/automatic-vendor-sharing/app2/webpack.config.js
@@ -38,10 +38,9 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
remotes: {
- app1: "app1",
+ app1: "app1@http://localhost:3001/remoteEntry.js",
},
exposes: {
"./Button": "./src/Button",
diff --git a/advanced-api/dynamic-remotes/app1/package.json b/advanced-api/dynamic-remotes/app1/package.json
index f61cbf7491b..db5e8199b4d 100644
--- a/advanced-api/dynamic-remotes/app1/package.json
+++ b/advanced-api/dynamic-remotes/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/advanced-api/dynamic-remotes/app1/src/App.js b/advanced-api/dynamic-remotes/app1/src/App.js
index 8b3b8e2eee2..573d717d2fd 100644
--- a/advanced-api/dynamic-remotes/app1/src/App.js
+++ b/advanced-api/dynamic-remotes/app1/src/App.js
@@ -4,6 +4,7 @@ function loadComponent(scope, module) {
return async () => {
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
await __webpack_init_sharing__("default");
+
const container = window[scope]; // or get the container somewhere else
// Initialize the container, it may provide shared modules
await container.init(__webpack_share_scopes__.default);
diff --git a/advanced-api/dynamic-remotes/app1/webpack.config.js b/advanced-api/dynamic-remotes/app1/webpack.config.js
index 64c58d2c04c..fe06023b264 100644
--- a/advanced-api/dynamic-remotes/app1/webpack.config.js
+++ b/advanced-api/dynamic-remotes/app1/webpack.config.js
@@ -33,7 +33,17 @@ module.exports = {
// version is inferred from package.json
// there is no version check for the required version
// so it will always use the higher version found
- shared: ["react", "react-dom"],
+ shared: {
+ react: {
+ import: "react", // the "react" package will be used a provided and fallback module
+ shareKey: "react", // under this name the shared module will be placed in the share scope
+ shareScope: "default", // share scope with this name will be used
+ singleton: true, // only a single version of the shared module is allowed
+ },
+ "react-dom": {
+ singleton: true, // only a single version of the shared module is allowed
+ },
+ },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/advanced-api/dynamic-remotes/app2/package.json b/advanced-api/dynamic-remotes/app2/package.json
index 77cf5cdc0f4..e31b9617d97 100644
--- a/advanced-api/dynamic-remotes/app2/package.json
+++ b/advanced-api/dynamic-remotes/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/advanced-api/dynamic-remotes/app2/webpack.config.js b/advanced-api/dynamic-remotes/app2/webpack.config.js
index 30e0dfe19a8..24a94d3bee8 100644
--- a/advanced-api/dynamic-remotes/app2/webpack.config.js
+++ b/advanced-api/dynamic-remotes/app2/webpack.config.js
@@ -33,7 +33,6 @@ module.exports = {
"./Widget": "./src/Widget",
},
shared: {
- "react-dom": "react-dom",
moment: "^2.24.0",
react: {
import: "react", // the "react" package will be used a provided and fallback module
@@ -41,6 +40,9 @@ module.exports = {
shareScope: "default", // share scope with this name will be used
singleton: true, // only a single version of the shared module is allowed
},
+ "react-dom": {
+ singleton: true, // only a single version of the shared module is allowed
+ },
},
}),
new HtmlWebpackPlugin({
diff --git a/advanced-api/dynamic-remotes/app3/package.json b/advanced-api/dynamic-remotes/app3/package.json
index cd3137da3d9..58bba3f5077 100644
--- a/advanced-api/dynamic-remotes/app3/package.json
+++ b/advanced-api/dynamic-remotes/app3/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/advanced-api/dynamic-remotes/app3/webpack.config.js b/advanced-api/dynamic-remotes/app3/webpack.config.js
index 1b91e234f59..650a4d656d2 100644
--- a/advanced-api/dynamic-remotes/app3/webpack.config.js
+++ b/advanced-api/dynamic-remotes/app3/webpack.config.js
@@ -37,16 +37,21 @@ module.exports = {
// version is inferred from package.json
// there is no version check for the required version
// so it will always use the higher version found
- shared: [
- "react",
- "react-dom",
+ shared: {
+ react: {
+ import: "react", // the "react" package will be used a provided and fallback module
+ shareKey: "react", // under this name the shared module will be placed in the share scope
+ shareScope: "default", // share scope with this name will be used
+ singleton: true, // only a single version of the shared module is allowed
+ },
+ "react-dom": {
+ singleton: true, // only a single version of the shared module is allowed
+ },
// adds moment as shared module
// version is inferred from package.json
// it will use the highest moment version that is >= 2.24 and < 3
- {
- moment: "^2.24.0",
- },
- ],
+ moment: "^2.24.0",
+ },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/angular-universal-ssr/client-app/package.json b/angular-universal-ssr/client-app/package.json
index 9f32b28edcd..0d67cfe08b3 100644
--- a/angular-universal-ssr/client-app/package.json
+++ b/angular-universal-ssr/client-app/package.json
@@ -40,7 +40,7 @@
"ts-node": "8.3.0",
"tslint": "6.1.2",
"typescript": "3.9.6",
- "webpack": "file:../patched_packages/webpack-5.0.0-beta.16.tgz",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12"
}
}
diff --git a/angular-universal-ssr/host-app/package.json b/angular-universal-ssr/host-app/package.json
index 9c910c3cc56..fe79e38ead7 100644
--- a/angular-universal-ssr/host-app/package.json
+++ b/angular-universal-ssr/host-app/package.json
@@ -46,7 +46,7 @@
"ts-node": "8.3.0",
"tslint": "6.1.2",
"typescript": "3.9.6",
- "webpack": "file:../patched_packages/webpack-5.0.0-beta.16.tgz",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12"
}
}
diff --git a/basic-host-remote/app1/package.json b/basic-host-remote/app1/package.json
index ebd6bdc6f40..0d103280244 100644
--- a/basic-host-remote/app1/package.json
+++ b/basic-host-remote/app1/package.json
@@ -9,7 +9,7 @@
"bundle-loader": "0.5.6",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/basic-host-remote/app1/public/index.html b/basic-host-remote/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/basic-host-remote/app1/public/index.html
+++ b/basic-host-remote/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/basic-host-remote/app1/webpack.config.js b/basic-host-remote/app1/webpack.config.js
index 14ac7050b78..614b3612aaf 100644
--- a/basic-host-remote/app1/webpack.config.js
+++ b/basic-host-remote/app1/webpack.config.js
@@ -31,14 +31,14 @@ module.exports = {
},
],
},
+ //http://localhost:3002/remoteEntry.js
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
- shared: ["react", "react-dom"],
+ shared: { react: { singleton: true }, "react-dom": { singleton: true } },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/basic-host-remote/app2/package.json b/basic-host-remote/app2/package.json
index 843ea1ba44f..67c245b056d 100644
--- a/basic-host-remote/app2/package.json
+++ b/basic-host-remote/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/basic-host-remote/app2/webpack.config.js b/basic-host-remote/app2/webpack.config.js
index 964e308dd5e..48396aecff5 100644
--- a/basic-host-remote/app2/webpack.config.js
+++ b/basic-host-remote/app2/webpack.config.js
@@ -32,7 +32,7 @@ module.exports = {
exposes: {
"./Button": "./src/Button",
},
- shared: ["react", "react-dom"],
+ shared: { react: { singleton: true }, "react-dom": { singleton: true } },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/basic-host-remote/yarn.lock b/basic-host-remote/yarn.lock
deleted file mode 100644
index fb57ccd13af..00000000000
--- a/basic-host-remote/yarn.lock
+++ /dev/null
@@ -1,4 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
diff --git a/bi-directional/app1/package.json b/bi-directional/app1/package.json
index 13a04b99dd4..0738661a7fc 100644
--- a/bi-directional/app1/package.json
+++ b/bi-directional/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/bi-directional/app1/public/index.html b/bi-directional/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/bi-directional/app1/public/index.html
+++ b/bi-directional/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/bi-directional/app1/src/bootstrap.js b/bi-directional/app1/src/bootstrap.js
new file mode 100644
index 00000000000..9873e9e71a6
--- /dev/null
+++ b/bi-directional/app1/src/bootstrap.js
@@ -0,0 +1,5 @@
+import App from "./App";
+import React from "react";
+import ReactDOM from "react-dom";
+
+ReactDOM.render(, document.getElementById("root"));
diff --git a/bi-directional/app1/src/index.js b/bi-directional/app1/src/index.js
index 9873e9e71a6..50599f7ad8e 100644
--- a/bi-directional/app1/src/index.js
+++ b/bi-directional/app1/src/index.js
@@ -1,5 +1 @@
-import App from "./App";
-import React from "react";
-import ReactDOM from "react-dom";
-
-ReactDOM.render(, document.getElementById("root"));
+import("./bootstrap");
diff --git a/bi-directional/app1/webpack.config.js b/bi-directional/app1/webpack.config.js
index 1e20178ecc1..498947acfe4 100644
--- a/bi-directional/app1/webpack.config.js
+++ b/bi-directional/app1/webpack.config.js
@@ -27,28 +27,29 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
filename: "remoteEntry.js",
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
exposes: {
"./Button": "./src/Button",
},
// sharing code based on the installed version, to allow for multiple vendors with different versions
- shared: {
- ...deps,
- react: {
- eager: true,
- singleton: true,
- requiredVersion: deps.react,
+ shared: [
+ {
+ ...deps,
+ react: {
+ // eager: true,
+ singleton: true,
+ requiredVersion: deps.react,
+ },
+ "react-dom": {
+ // eager: true,
+ singleton: true,
+ requiredVersion: deps["react-dom"],
+ },
},
- "react-dom": {
- eager: true,
- singleton: true,
- requiredVersion: deps["react-dom"],
- },
- },
+ ],
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/bi-directional/app2/package.json b/bi-directional/app2/package.json
index f489b6d1ecd..957f7025c44 100644
--- a/bi-directional/app2/package.json
+++ b/bi-directional/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/bi-directional/app2/public/index.html b/bi-directional/app2/public/index.html
index dea6b023494..19f0d60626e 100644
--- a/bi-directional/app2/public/index.html
+++ b/bi-directional/app2/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/bi-directional/app2/src/bootstrap.js b/bi-directional/app2/src/bootstrap.js
new file mode 100644
index 00000000000..9873e9e71a6
--- /dev/null
+++ b/bi-directional/app2/src/bootstrap.js
@@ -0,0 +1,5 @@
+import App from "./App";
+import React from "react";
+import ReactDOM from "react-dom";
+
+ReactDOM.render(, document.getElementById("root"));
diff --git a/bi-directional/app2/src/index.js b/bi-directional/app2/src/index.js
index 9873e9e71a6..50599f7ad8e 100644
--- a/bi-directional/app2/src/index.js
+++ b/bi-directional/app2/src/index.js
@@ -1,5 +1 @@
-import App from "./App";
-import React from "react";
-import ReactDOM from "react-dom";
-
-ReactDOM.render(, document.getElementById("root"));
+import("./bootstrap");
diff --git a/bi-directional/app2/webpack.config.js b/bi-directional/app2/webpack.config.js
index 3ef4b7b8a8d..5ca2e3e84e0 100644
--- a/bi-directional/app2/webpack.config.js
+++ b/bi-directional/app2/webpack.config.js
@@ -27,27 +27,28 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
remotes: {
- app1: "app1",
+ app1: "app1@http://localhost:3001/remoteEntry.js",
},
exposes: {
"./Button": "./src/Button",
},
- shared: {
- ...deps,
- react: {
- eager: true,
- singleton: true,
- requiredVersion: deps.react,
+ shared: [
+ {
+ ...deps,
+ react: {
+ // eager: true,
+ singleton: true,
+ requiredVersion: deps.react,
+ },
+ "react-dom": {
+ // eager: true,
+ singleton: true,
+ requiredVersion: deps["react-dom"],
+ },
},
- "react-dom": {
- eager: true,
- singleton: true,
- requiredVersion: deps["react-dom"],
- },
- },
+ ],
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/comprehensive-demo/app-01/package.json b/comprehensive-demo/app-01/package.json
index 17bd3e71180..df69ffc757b 100644
--- a/comprehensive-demo/app-01/package.json
+++ b/comprehensive-demo/app-01/package.json
@@ -13,7 +13,7 @@
"react-dom": "^16.13.0",
"react-router-dom": "^5.1.2",
"serve": "^11.3.0",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "^3.3.11"
},
"scripts": {
diff --git a/comprehensive-demo/app-01/public/index.html b/comprehensive-demo/app-01/public/index.html
index 4b0aa65dc63..053c832958e 100644
--- a/comprehensive-demo/app-01/public/index.html
+++ b/comprehensive-demo/app-01/public/index.html
@@ -1,12 +1,6 @@
-
-
-
-
-
-
-
+
diff --git a/comprehensive-demo/app-01/webpack.config.js b/comprehensive-demo/app-01/webpack.config.js
index dfcb155676d..4c2db3d6cb5 100644
--- a/comprehensive-demo/app-01/webpack.config.js
+++ b/comprehensive-demo/app-01/webpack.config.js
@@ -1,7 +1,7 @@
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ModuleFederationPlugin = require("webpack").container
.ModuleFederationPlugin;
-
+const deps = require("./package.json").dependencies;
module.exports = {
entry: "./src/index",
cache: false,
@@ -41,19 +41,32 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app_01",
- library: { type: "var", name: "app_01" },
filename: "remoteEntry.js",
remotes: {
- app_02: "app_02",
- app_03: "app_03",
- app_04: "app_04",
- app_05: "app_05",
+ app_02: "app_02@http://localhost:3002/remoteEntry.js",
+ app_03: "app_03@http://localhost:3003/remoteEntry.js",
+ app_04: "app_04@http://localhost:3004/remoteEntry.js",
+ app_05: "app_05@http://localhost:3005/remoteEntry.js",
},
exposes: {
"./SideNav": "./src/SideNav",
"./Page": "./src/Page",
},
- shared: ["react", "react-dom", "@material-ui/core", "react-router-dom"],
+ shared: {
+ ...deps,
+ "@material-ui/core": {
+ singleton: true,
+ },
+ "react-router-dom": {
+ singleton: true,
+ },
+ "react-dom": {
+ singleton: true,
+ },
+ react: {
+ singleton: true,
+ },
+ },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/comprehensive-demo/app-02/package.json b/comprehensive-demo/app-02/package.json
index 97f4b66c810..53e17adb88a 100644
--- a/comprehensive-demo/app-02/package.json
+++ b/comprehensive-demo/app-02/package.json
@@ -12,7 +12,7 @@
"react-dom": "^16.13.0",
"react-router-dom": "^5.1.2",
"serve": "^11.3.0",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "^3.3.11"
},
"scripts": {
diff --git a/comprehensive-demo/app-02/public/index.html b/comprehensive-demo/app-02/public/index.html
index d8a82675e80..053c832958e 100644
--- a/comprehensive-demo/app-02/public/index.html
+++ b/comprehensive-demo/app-02/public/index.html
@@ -1,9 +1,6 @@
-
-
-
-
+
diff --git a/comprehensive-demo/app-02/webpack.config.js b/comprehensive-demo/app-02/webpack.config.js
index 01ec3b0e0b4..74df8a677aa 100644
--- a/comprehensive-demo/app-02/webpack.config.js
+++ b/comprehensive-demo/app-02/webpack.config.js
@@ -1,7 +1,7 @@
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ModuleFederationPlugin = require("webpack").container
.ModuleFederationPlugin;
-
+const deps = require("./package.json").dependencies;
module.exports = {
entry: "./src/index",
cache: false,
@@ -37,17 +37,30 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app_02",
- library: { type: "var", name: "app_02" },
filename: "remoteEntry.js",
remotes: {
- app_01: "app_01",
- app_03: "app_03",
+ app_01: "app_01@http://localhost:3001/remoteEntry.js",
+ app_03: "app_03@http://localhost:3003/remoteEntry.js",
},
exposes: {
"./Dialog": "./src/Dialog",
"./Tabs": "./src/Tabs",
},
- shared: ["react", "react-dom", "@material-ui/core", "react-router-dom"],
+ shared: {
+ ...deps,
+ "@material-ui/core": {
+ singleton: true,
+ },
+ "react-router-dom": {
+ singleton: true,
+ },
+ "react-dom": {
+ singleton: true,
+ },
+ react: {
+ singleton: true,
+ },
+ },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/comprehensive-demo/app-03/package.json b/comprehensive-demo/app-03/package.json
index bf755d1bd91..c4188a89182 100644
--- a/comprehensive-demo/app-03/package.json
+++ b/comprehensive-demo/app-03/package.json
@@ -11,7 +11,7 @@
"react-dom": "^16.13.0",
"serve": "^11.3.0",
"styled-components": "^5.0.1",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "^3.3.11"
},
"scripts": {
diff --git a/comprehensive-demo/app-03/public/index.html b/comprehensive-demo/app-03/public/index.html
index e7a04617e3a..053c832958e 100644
--- a/comprehensive-demo/app-03/public/index.html
+++ b/comprehensive-demo/app-03/public/index.html
@@ -1,8 +1,6 @@
-
-
-
+
diff --git a/comprehensive-demo/app-03/webpack.config.js b/comprehensive-demo/app-03/webpack.config.js
index 15c712b97eb..34b4ea2b30b 100644
--- a/comprehensive-demo/app-03/webpack.config.js
+++ b/comprehensive-demo/app-03/webpack.config.js
@@ -37,15 +37,21 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app_03",
- library: { type: "var", name: "app_03" },
filename: "remoteEntry.js",
remotes: {
- app_01: "app_01",
+ app_01: "app_01@http://localhost:3001/remoteEntry.js",
},
exposes: {
"./Button": "./src/Button",
},
- shared: ["react", "react-dom"],
+ shared: {
+ "react-dom": {
+ singleton: true,
+ },
+ react: {
+ singleton: true,
+ },
+ },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/comprehensive-demo/app-04/package.json b/comprehensive-demo/app-04/package.json
index 446b2403b79..a54ed61d8a4 100644
--- a/comprehensive-demo/app-04/package.json
+++ b/comprehensive-demo/app-04/package.json
@@ -10,7 +10,7 @@
"svelte": "3.24.0",
"svelte-loader": "2.13.6",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0",
"serve": "11.3.2"
diff --git a/comprehensive-demo/app-04/public/index.html b/comprehensive-demo/app-04/public/index.html
index 4f33a7c91bb..311951b3158 100644
--- a/comprehensive-demo/app-04/public/index.html
+++ b/comprehensive-demo/app-04/public/index.html
@@ -1,19 +1,18 @@
-
+
-
-
-
+
+
+
- Svelte app
+ Svelte app
-
-
-
-
+
+
+
+
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
diff --git a/comprehensive-demo/app-04/webpack.config.js b/comprehensive-demo/app-04/webpack.config.js
index 6a86512e623..d8c4fbe4757 100644
--- a/comprehensive-demo/app-04/webpack.config.js
+++ b/comprehensive-demo/app-04/webpack.config.js
@@ -52,7 +52,6 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app_04",
- library: { type: "var", name: "app_04" },
filename: "remoteEntry.js",
exposes: {
"./App": "./src/main.js",
diff --git a/comprehensive-demo/app-05/package.json b/comprehensive-demo/app-05/package.json
index 9ad07ee12a8..aa0988595a3 100644
--- a/comprehensive-demo/app-05/package.json
+++ b/comprehensive-demo/app-05/package.json
@@ -16,7 +16,7 @@
"ts-loader": "5.4.5",
"typescript": "3.9.6",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0",
"serve": "11.3.2"
diff --git a/comprehensive-demo/app-05/webpack.config.js b/comprehensive-demo/app-05/webpack.config.js
index 6e6a1a12238..3af40131a4b 100644
--- a/comprehensive-demo/app-05/webpack.config.js
+++ b/comprehensive-demo/app-05/webpack.config.js
@@ -34,7 +34,6 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app_05",
- library: { type: "var", name: "app_05" },
filename: "remoteEntry.js",
exposes: {
"./ActionButton": "./src/components/action-button.ts",
diff --git a/dashboard-example/app1/package.json b/dashboard-example/app1/package.json
index 286add08d53..0ff4f20558b 100644
--- a/dashboard-example/app1/package.json
+++ b/dashboard-example/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0",
"@module-federation/dashboard-plugin": "@module-federation/dashboard-plugin"
diff --git a/dashboard-example/app1/public/index.html b/dashboard-example/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/dashboard-example/app1/public/index.html
+++ b/dashboard-example/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/dashboard-example/app1/webpack.config.js b/dashboard-example/app1/webpack.config.js
index 9b38f18ed86..172e1e1c475 100644
--- a/dashboard-example/app1/webpack.config.js
+++ b/dashboard-example/app1/webpack.config.js
@@ -29,10 +29,9 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
filename: "remoteEntry.js",
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
exposes: {
Button: "./src/Button",
diff --git a/dashboard-example/app2/package.json b/dashboard-example/app2/package.json
index 3d7a91a33a2..2aa81817563 100644
--- a/dashboard-example/app2/package.json
+++ b/dashboard-example/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0",
"@module-federation/dashboard-plugin": "@module-federation/dashboard-plugin"
diff --git a/dashboard-example/app2/public/index.html b/dashboard-example/app2/public/index.html
index dea6b023494..19f0d60626e 100644
--- a/dashboard-example/app2/public/index.html
+++ b/dashboard-example/app2/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/dashboard-example/app2/webpack.config.js b/dashboard-example/app2/webpack.config.js
index d45e4dd6e16..c35d18aa1f2 100644
--- a/dashboard-example/app2/webpack.config.js
+++ b/dashboard-example/app2/webpack.config.js
@@ -35,7 +35,7 @@ module.exports = {
library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
remotes: {
- app1: "app1",
+ app1: "app1@http://localhost:3001/remoteEntry.js",
},
exposes: {
Button: "./src/Button",
diff --git a/dynamic-system-host/app1/package.json b/dynamic-system-host/app1/package.json
index a17b6c9c7a1..21eaae1a4e8 100644
--- a/dynamic-system-host/app1/package.json
+++ b/dynamic-system-host/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/dynamic-system-host/app1/webpack.config.js b/dynamic-system-host/app1/webpack.config.js
index b768a544289..9dc9c32ede9 100644
--- a/dynamic-system-host/app1/webpack.config.js
+++ b/dynamic-system-host/app1/webpack.config.js
@@ -28,8 +28,7 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
- shared: ["react", "react-dom"],
+ shared: { react: { singleton: true }, "react-dom": { singleton: true } },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/dynamic-system-host/app2/package.json b/dynamic-system-host/app2/package.json
index 53b5b016c2f..73f4554e0dd 100644
--- a/dynamic-system-host/app2/package.json
+++ b/dynamic-system-host/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/dynamic-system-host/app2/webpack.config.js b/dynamic-system-host/app2/webpack.config.js
index 010e9beb3fc..ed975f097df 100644
--- a/dynamic-system-host/app2/webpack.config.js
+++ b/dynamic-system-host/app2/webpack.config.js
@@ -28,12 +28,14 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
exposes: {
"./Widget": "./src/Widget",
},
- shared: ["react", "react-dom", "moment"],
+ shared: [
+ { react: { singleton: true }, "react-dom": { singleton: true } },
+ "moment",
+ ],
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/dynamic-system-host/app3/package.json b/dynamic-system-host/app3/package.json
index 4ca46aec3b0..df09f5c3c3b 100644
--- a/dynamic-system-host/app3/package.json
+++ b/dynamic-system-host/app3/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/dynamic-system-host/app3/webpack.config.js b/dynamic-system-host/app3/webpack.config.js
index ef5999720ae..c9b6b3631d0 100644
--- a/dynamic-system-host/app3/webpack.config.js
+++ b/dynamic-system-host/app3/webpack.config.js
@@ -27,12 +27,14 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app3",
- library: { type: "var", name: "app3" },
filename: "remoteEntry.js",
exposes: {
"./Widget": "./src/Widget",
},
- shared: ["react", "react-dom", "moment"],
+ shared: [
+ { react: { singleton: true }, "react-dom": { singleton: true } },
+ "moment",
+ ],
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/multi-threaded-ssr/website1/package.json b/multi-threaded-ssr/website1/package.json
index 7829a304049..597b8f86726 100644
--- a/multi-threaded-ssr/website1/package.json
+++ b/multi-threaded-ssr/website1/package.json
@@ -83,7 +83,7 @@
"sass-loader": "9.0.2",
"style-loader": "1.2.1",
"url-loader": "3.0.0",
- "webpack": "5.0.0-beta.16",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-middleware": "4.0.0-rc.2",
"webpack-hot-middleware": "2.25.0",
diff --git a/multi-threaded-ssr/website2/package.json b/multi-threaded-ssr/website2/package.json
index d0cafa11a52..2d2746e6c4f 100644
--- a/multi-threaded-ssr/website2/package.json
+++ b/multi-threaded-ssr/website2/package.json
@@ -87,7 +87,7 @@
"sass-loader": "9.0.2",
"style-loader": "1.2.1",
"url-loader": "3.0.0",
- "webpack": "5.0.0-beta.16",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-middleware": "4.0.0-rc.2",
"webpack-hot-middleware": "2.25.0",
diff --git a/nested/app1/package.json b/nested/app1/package.json
index bd8426a65de..6392432c273 100644
--- a/nested/app1/package.json
+++ b/nested/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/nested/app1/public/index.html b/nested/app1/public/index.html
index e71ed9ccf2b..19f0d60626e 100644
--- a/nested/app1/public/index.html
+++ b/nested/app1/public/index.html
@@ -1,8 +1,5 @@
-
-
-
-
+
diff --git a/nested/app1/webpack.config.js b/nested/app1/webpack.config.js
index a703f425dd6..5437601e8fa 100644
--- a/nested/app1/webpack.config.js
+++ b/nested/app1/webpack.config.js
@@ -28,12 +28,11 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
remotes: {
- app2: "app2",
- app3: "app3",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
+ app3: "app3@http://localhost:3003/remoteEntry.js",
},
- shared: ["react", "react-dom"],
+ shared: { react: { singleton: true }, "react-dom": { singleton: true } },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/nested/app2/package.json b/nested/app2/package.json
index db846545a89..ad689ee2465 100644
--- a/nested/app2/package.json
+++ b/nested/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/nested/app2/public/index.html b/nested/app2/public/index.html
index 61190abc537..19f0d60626e 100644
--- a/nested/app2/public/index.html
+++ b/nested/app2/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/nested/app2/webpack.config.js b/nested/app2/webpack.config.js
index 1295b19611d..acac8949f38 100644
--- a/nested/app2/webpack.config.js
+++ b/nested/app2/webpack.config.js
@@ -28,15 +28,14 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
exposes: {
"./ButtonContainer": "./src/ButtonContainer",
},
remotes: {
- app3: "app3",
+ app3: "app3@http://localhost:3003/remoteEntry.js",
},
- shared: ["react", "react-dom"],
+ shared: { react: { singleton: true }, "react-dom": { singleton: true } },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/nested/app3/package.json b/nested/app3/package.json
index 139c08f968d..35f3184f953 100644
--- a/nested/app3/package.json
+++ b/nested/app3/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/nested/app3/webpack.config.js b/nested/app3/webpack.config.js
index 58f9d94797b..2a84355ac7c 100644
--- a/nested/app3/webpack.config.js
+++ b/nested/app3/webpack.config.js
@@ -28,12 +28,11 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app3",
- library: { type: "var", name: "app3" },
filename: "remoteEntry.js",
exposes: {
"./Button": "./src/Button",
},
- shared: ["react", "react-dom"],
+ shared: { react: { singleton: true }, "react-dom": { singleton: true } },
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/nextjs-sidecar/README.md b/nextjs-sidecar/README.md
index 3fe14756ce1..4a8fbe535bd 100644
--- a/nextjs-sidecar/README.md
+++ b/nextjs-sidecar/README.md
@@ -28,7 +28,7 @@ Once NextJS supports Webpack 5 the sidecar application can be removed, and the s
# Running the example
-Build and run the code in three seperate terminals:
+Build and run the code in three separate terminals:
```shell script
> cd dog-admin
@@ -41,6 +41,6 @@ Build and run the code in three seperate terminals:
```
```shell script
-> cd host/wp5-sidecar
+> cd host/sidecar
> yarn && yarn build && yarn start
```
diff --git a/nextjs-sidecar/dog-admin/package.json b/nextjs-sidecar/dog-admin/package.json
index 816793ff19f..452d8339dbf 100644
--- a/nextjs-sidecar/dog-admin/package.json
+++ b/nextjs-sidecar/dog-admin/package.json
@@ -20,12 +20,15 @@
"css-loader": "3.6.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"style-loader": "1.2.1",
- "webpack": "^5.0.0-beta.22",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
"dependencies": {
"react": "16.13.1",
"react-dom": "16.13.1"
+ },
+ "resolutions": {
+ "webpack": "5.0.0-beta.22"
}
}
diff --git a/nextjs-sidecar/host/sidecar/package.json b/nextjs-sidecar/host/sidecar/package.json
index 23af0fa0670..c9d9efab6f2 100644
--- a/nextjs-sidecar/host/sidecar/package.json
+++ b/nextjs-sidecar/host/sidecar/package.json
@@ -15,10 +15,13 @@
"@babel/preset-env": "7.10.4",
"@babel/preset-react": "7.10.4",
"babel-loader": "8.1.0",
- "webpack": "^5.0.0-beta.22",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12"
},
"dependencies": {
"react": "16.13.1"
+ },
+ "resolutions": {
+ "webpack": "5.0.0-beta.22"
}
}
diff --git a/nextjs-sidecar/host/sidecar/yarn.lock b/nextjs-sidecar/host/sidecar/yarn.lock
index 40f870c3333..5e86366f71b 100644
--- a/nextjs-sidecar/host/sidecar/yarn.lock
+++ b/nextjs-sidecar/host/sidecar/yarn.lock
@@ -461,8 +461,6 @@
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.4.tgz#1afa595744f75e43a91af73b0d998ecfe4ebc2e8"
integrity sha512-WzXDarQXYYfjaV1szJvN3AD7rZgZzC1JtjJZ8dMHUyiK8mxPRahynp14zzNjU3VkPqPsO38CzxiWO1c9ARZ8JA==
- dependencies:
- "@babel/helper-plugin-utils" "^7.10.4"
"@babel/plugin-transform-block-scoping@^7.10.4":
version "7.10.4"
@@ -3008,7 +3006,7 @@ webpack-sources@^1.4.3:
source-list-map "^2.0.0"
source-map "~0.6.1"
-webpack@^5.0.0-beta.22:
+webpack@5.0.0-beta.22:
version "5.0.0-beta.22"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.0.0-beta.22.tgz#c5560c3b470ccab69c66273a3bcf314f85926bea"
integrity sha512-t3HnQPy88PASM2ur0rvUXau8vAz287BlH8DpiaHoWkjlLThLx7olzExtTsVJEFen/9uTfWOV21dWS8kiYmGLkA==
diff --git a/redux-reducer-injection/app1/package.json b/redux-reducer-injection/app1/package.json
index 047aba951ba..1df195bbb52 100644
--- a/redux-reducer-injection/app1/package.json
+++ b/redux-reducer-injection/app1/package.json
@@ -3,19 +3,21 @@
"version": "0.0.0",
"private": true,
"dependencies": {
- "@babel/core": "^7.8.6",
- "@babel/preset-react": "^7.8.3",
"@material-ui/core": "^4.9.4",
- "babel-loader": "^8.0.6",
- "html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-redux": "^7.2.0",
"react-router-dom": "^5.1.2",
- "redux": "^4.0.5",
+ "redux": "^4.0.5"
+ },
+ "devDependencies": {
+ "babel-loader": "^8.0.6",
+ "html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "^11.3.0",
- "webpack": "5.0.0-beta.18",
- "webpack-cli": "^3.3.11"
+ "webpack": "5.0.0-beta.22",
+ "webpack-cli": "^3.3.11",
+ "@babel/core": "^7.8.6",
+ "@babel/preset-react": "^7.8.3"
},
"scripts": {
"start": "webpack --watch",
diff --git a/redux-reducer-injection/app1/webpack.config.js b/redux-reducer-injection/app1/webpack.config.js
index 50874bec755..9d745fbd296 100644
--- a/redux-reducer-injection/app1/webpack.config.js
+++ b/redux-reducer-injection/app1/webpack.config.js
@@ -1,5 +1,6 @@
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
+const deps = require('./package.json').dependencies;
module.exports = {
entry: './src/index',
@@ -38,7 +39,15 @@ module.exports = {
name: 'app1',
library: { type: 'var', name: 'app1' },
filename: 'remoteEntry.js',
- shared: ['react', 'react-dom'],
+ shared: {
+ ...deps,
+ react: {
+ singleton: true,
+ },
+ 'react-dom': {
+ singleton: true,
+ },
+ },
}),
new HtmlWebpackPlugin({
template: './public/index.html',
diff --git a/redux-reducer-injection/app2/package.json b/redux-reducer-injection/app2/package.json
index e93312ae116..2608e29a8ef 100644
--- a/redux-reducer-injection/app2/package.json
+++ b/redux-reducer-injection/app2/package.json
@@ -3,16 +3,18 @@
"version": "0.0.0",
"private": true,
"dependencies": {
+ "@material-ui/core": "^4.9.4",
+ "react": "^16.13.0",
+ "react-dom": "^16.13.0",
+ "react-redux": "^7.2.0"
+ },
+ "devDependencies": {
"@babel/core": "^7.8.6",
"@babel/preset-react": "^7.8.3",
- "@material-ui/core": "^4.9.4",
"babel-loader": "^8.0.6",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
- "react": "^16.13.0",
- "react-dom": "^16.13.0",
- "react-redux": "^7.2.0",
"serve": "^11.3.0",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "^3.3.11"
},
"scripts": {
diff --git a/redux-reducer-injection/app2/webpack.config.js b/redux-reducer-injection/app2/webpack.config.js
index 76571b8e79e..ece902f0284 100644
--- a/redux-reducer-injection/app2/webpack.config.js
+++ b/redux-reducer-injection/app2/webpack.config.js
@@ -1,6 +1,6 @@
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
-
+const deps = require('./package.json').dependencies;
module.exports = {
entry: './src/index',
cache: false,
@@ -32,12 +32,19 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: 'app2',
- library: { type: 'var', name: 'app2' },
filename: 'remoteEntry.js',
exposes: {
'./RemoteApp': './src/RemoteApp',
},
- shared: ['react', 'react-dom'],
+ shared: {
+ ...deps,
+ react: {
+ singleton: true,
+ },
+ 'react-dom': {
+ singleton: true,
+ },
+ },
}),
new HtmlWebpackPlugin({
template: './public/index.html',
diff --git a/rollup-federation-demo/rollup-spa/rs-sidecar/package.json b/rollup-federation-demo/rollup-spa/rs-sidecar/package.json
index 97bfa5e6849..2ee289978ba 100644
--- a/rollup-federation-demo/rollup-spa/rs-sidecar/package.json
+++ b/rollup-federation-demo/rollup-spa/rs-sidecar/package.json
@@ -20,7 +20,7 @@
"css-loader": "3.6.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"style-loader": "1.2.1",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/rollup-federation-demo/rollup-spa/src/index.js b/rollup-federation-demo/rollup-spa/src/index.js
index 6bd03e3aeb5..42994907fa2 100644
--- a/rollup-federation-demo/rollup-spa/src/index.js
+++ b/rollup-federation-demo/rollup-spa/src/index.js
@@ -1,6 +1,6 @@
-import React from 'react';
-import ReactDOM from 'react-dom';
+import React from "react";
+import ReactDOM from "react-dom";
-import App from './app';
+import App from "./app";
-ReactDOM.render(, document.getElementById('root'));
+ReactDOM.render(, document.getElementById("root"));
diff --git a/rollup-federation-demo/webpack-spa/package-lock.json b/rollup-federation-demo/webpack-spa/package-lock.json
index 5c005a5efe4..b0ab94a6f94 100644
--- a/rollup-federation-demo/webpack-spa/package-lock.json
+++ b/rollup-federation-demo/webpack-spa/package-lock.json
@@ -4941,8 +4941,8 @@
}
},
"webpack": {
- "version": "5.0.0-beta.18",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.0.0-beta.18.tgz",
+ "version": "5.0.0-beta.22",
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.0.0-beta.22.tgz",
"integrity": "sha512-v+kyUEA1sQnSP6gcchyEY/Jufb1XEbniCmA7uXvWXWFPQnN51ChW8liF0FgUre8yYI5jRqVsNHFw3H9rGCB8qw==",
"dev": true,
"requires": {
diff --git a/rollup-federation-demo/webpack-spa/package.json b/rollup-federation-demo/webpack-spa/package.json
index 6af39e29518..6027b219be3 100644
--- a/rollup-federation-demo/webpack-spa/package.json
+++ b/rollup-federation-demo/webpack-spa/package.json
@@ -17,7 +17,7 @@
"@babel/preset-react": "7.10.4",
"babel-loader": "8.1.0",
"npm-run-all": "4.1.5",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
}
diff --git a/rollup-federation-demo/webpack-spa/src/Button.js b/rollup-federation-demo/webpack-spa/src/Button.js
index 41f24da13a1..3775601556c 100644
--- a/rollup-federation-demo/webpack-spa/src/Button.js
+++ b/rollup-federation-demo/webpack-spa/src/Button.js
@@ -6,10 +6,6 @@ const style = {
padding: 12,
};
-const Button = () => (
-
-);
+const Button = () => ;
export default Button;
diff --git a/rollup-federation-demo/webpack-spa/src/index.js b/rollup-federation-demo/webpack-spa/src/index.js
index b93c7a0268a..50599f7ad8e 100644
--- a/rollup-federation-demo/webpack-spa/src/index.js
+++ b/rollup-federation-demo/webpack-spa/src/index.js
@@ -1 +1 @@
-import('./bootstrap');
+import("./bootstrap");
diff --git a/self-healing/app1/package.json b/self-healing/app1/package.json
index 7e2f8ce050b..e4ad17cb034 100644
--- a/self-healing/app1/package.json
+++ b/self-healing/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/self-healing/app1/public/index.html b/self-healing/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/self-healing/app1/public/index.html
+++ b/self-healing/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/self-healing/app1/webpack.config.js b/self-healing/app1/webpack.config.js
index 349841adc0a..c1d1b40834f 100644
--- a/self-healing/app1/webpack.config.js
+++ b/self-healing/app1/webpack.config.js
@@ -28,13 +28,14 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
filename: "remoteEntry.js",
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
// app2 is expecting "styled-components" shared dependency
- shared: ["react", "react-dom"],
+ shared: [
+ { react: { singleton: true }, "react-dom": { singleton: true } },
+ ],
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/self-healing/app2/package.json b/self-healing/app2/package.json
index 28bf5db40af..8d94f920ec8 100644
--- a/self-healing/app2/package.json
+++ b/self-healing/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/self-healing/app2/public/index.html b/self-healing/app2/public/index.html
index dea6b023494..19f0d60626e 100644
--- a/self-healing/app2/public/index.html
+++ b/self-healing/app2/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/self-healing/app2/webpack.config.js b/self-healing/app2/webpack.config.js
index 1ed2324b53a..a1165e45539 100644
--- a/self-healing/app2/webpack.config.js
+++ b/self-healing/app2/webpack.config.js
@@ -28,16 +28,18 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
remotes: {
- app1: "app1",
+ app1: "app1@http://localhost:3001/remoteEntry.js",
},
exposes: {
"./Button": "./src/Button",
},
// app2 is expecting "styled-components" as a shared dependency
- shared: ["react", "react-dom", "styled-components"],
+ shared: [
+ "styled-components",
+ { react: { singleton: true }, "react-dom": { singleton: true } },
+ ],
}),
new HtmlWebpackPlugin({
template: "./public/index.html",
diff --git a/server-side-rendering/website1/build/webpack.config.js/client.base.js b/server-side-rendering/website1/build/webpack.config.js/client.base.js
index 36cac14bb98..f3c7d7ba3bc 100755
--- a/server-side-rendering/website1/build/webpack.config.js/client.base.js
+++ b/server-side-rendering/website1/build/webpack.config.js/client.base.js
@@ -20,10 +20,9 @@ module.exports = merge.smart(common, {
...plugins.client,
new ModuleFederationPlugin({
name: "website1",
- library: { type: "var", name: "website1" },
filename: "container.js",
remotes: {
- website2: "website2",
+ website2: "website2@http://localhost:3002/static/container.js",
},
shared: ["react", "react-dom"],
}),
diff --git a/server-side-rendering/website1/package.json b/server-side-rendering/website1/package.json
index a4586bfe166..3c3d4c4d491 100644
--- a/server-side-rendering/website1/package.json
+++ b/server-side-rendering/website1/package.json
@@ -83,7 +83,7 @@
"sass-loader": "9.0.2",
"style-loader": "1.2.1",
"url-loader": "4.1.0",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-middleware": "4.0.0-rc.2",
"webpack-hot-middleware": "2.25.0",
diff --git a/server-side-rendering/website1/server/render.js b/server-side-rendering/website1/server/render.js
index 205a23e6e2c..3824c1821c6 100644
--- a/server-side-rendering/website1/server/render.js
+++ b/server-side-rendering/website1/server/render.js
@@ -38,7 +38,6 @@ export default async (req, res, next) => {
${helmet.title.toString()}
${helmet.meta.toString()}
${helmet.link.toString()}
-
${styleTags}
diff --git a/server-side-rendering/website2/build/webpack.config.js/client.base.js b/server-side-rendering/website2/build/webpack.config.js/client.base.js
index 9fe748a9526..f5d7a6d55d1 100755
--- a/server-side-rendering/website2/build/webpack.config.js/client.base.js
+++ b/server-side-rendering/website2/build/webpack.config.js/client.base.js
@@ -26,7 +26,7 @@ module.exports = merge.smart(common, {
"./SomeComponent": "./src/components/SomeComponent",
},
remotes: {
- website1: "website1",
+ website1: "website1@http://localhost:3001/static/container.js",
},
shared: ["react", "react-dom"],
}),
diff --git a/server-side-rendering/website2/package.json b/server-side-rendering/website2/package.json
index 7a064e18a80..913631ac88f 100644
--- a/server-side-rendering/website2/package.json
+++ b/server-side-rendering/website2/package.json
@@ -85,7 +85,7 @@
"sass-loader": "9.0.2",
"style-loader": "1.2.1",
"url-loader": "4.1.0",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-middleware": "4.0.0-rc.2",
"webpack-hot-middleware": "2.25.0",
diff --git a/shared-context/app1/package.json b/shared-context/app1/package.json
index 30c09a9f6bb..28b43200af2 100644
--- a/shared-context/app1/package.json
+++ b/shared-context/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-context/app1/public/index.html b/shared-context/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/shared-context/app1/public/index.html
+++ b/shared-context/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/shared-context/app1/webpack.config.js b/shared-context/app1/webpack.config.js
index 20562e188c7..bbee281373c 100644
--- a/shared-context/app1/webpack.config.js
+++ b/shared-context/app1/webpack.config.js
@@ -28,9 +28,8 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
shared: ["react", "react-dom", "@shared-context/shared-library"],
}),
diff --git a/shared-context/app2/package.json b/shared-context/app2/package.json
index cc0357d42b4..4781f2ab784 100644
--- a/shared-context/app2/package.json
+++ b/shared-context/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-context/app2/webpack.config.js b/shared-context/app2/webpack.config.js
index c2ee2811fd5..0c1ca150625 100644
--- a/shared-context/app2/webpack.config.js
+++ b/shared-context/app2/webpack.config.js
@@ -28,7 +28,6 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
exposes: {
"./Welcome": "./src/Welcome",
diff --git a/shared-routes2/app1/package.json b/shared-routes2/app1/package.json
index 484a7d91b1c..763fafda985 100644
--- a/shared-routes2/app1/package.json
+++ b/shared-routes2/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-routes2/app1/public/index.html b/shared-routes2/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/shared-routes2/app1/public/index.html
+++ b/shared-routes2/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/shared-routes2/app1/webpack.config.js b/shared-routes2/app1/webpack.config.js
index 75d5ec782b1..47eb090d598 100644
--- a/shared-routes2/app1/webpack.config.js
+++ b/shared-routes2/app1/webpack.config.js
@@ -28,10 +28,9 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
filename: "remoteEntry.js",
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
exposes: {
"./Navigation": "./src/Navigation",
diff --git a/shared-routes2/app2/package.json b/shared-routes2/app2/package.json
index 9347a3f053b..f3cf081abee 100644
--- a/shared-routes2/app2/package.json
+++ b/shared-routes2/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-routes2/app2/public/index.html b/shared-routes2/app2/public/index.html
index dea6b023494..19f0d60626e 100644
--- a/shared-routes2/app2/public/index.html
+++ b/shared-routes2/app2/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/shared-routes2/app2/webpack.config.js b/shared-routes2/app2/webpack.config.js
index c1e3030cc85..e1a99f89f02 100644
--- a/shared-routes2/app2/webpack.config.js
+++ b/shared-routes2/app2/webpack.config.js
@@ -29,10 +29,9 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
remotes: {
- app1: "app1",
+ app1: "app1@http://localhost:3001/remoteEntry.js",
},
exposes: {
"./routes": "./src/routes",
diff --git a/shared-routing/dashboard/package.json b/shared-routing/dashboard/package.json
index 312c52babe5..3fbe3cac7f0 100644
--- a/shared-routing/dashboard/package.json
+++ b/shared-routing/dashboard/package.json
@@ -9,7 +9,7 @@
"find-up": "4.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-routing/order/package.json b/shared-routing/order/package.json
index 701fadbced8..3f03fe42cbf 100644
--- a/shared-routing/order/package.json
+++ b/shared-routing/order/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-routing/profile/package.json b/shared-routing/profile/package.json
index 1a48e61ae12..fcfdf859e3a 100644
--- a/shared-routing/profile/package.json
+++ b/shared-routing/profile/package.json
@@ -10,7 +10,7 @@
"find-up": "4.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-routing/sales/package.json b/shared-routing/sales/package.json
index 3826d1452bb..ea5cf3c8e33 100644
--- a/shared-routing/sales/package.json
+++ b/shared-routing/sales/package.json
@@ -9,7 +9,7 @@
"find-up": "4.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/shared-routing/shell/package.json b/shared-routing/shell/package.json
index d5a0bee01c1..f659a06d5e8 100644
--- a/shared-routing/shell/package.json
+++ b/shared-routing/shell/package.json
@@ -9,7 +9,7 @@
"find-up": "4.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/streamed-federation/app1/package.json b/streamed-federation/app1/package.json
index 03deb6041e7..9d5d44c1f1b 100644
--- a/streamed-federation/app1/package.json
+++ b/streamed-federation/app1/package.json
@@ -43,7 +43,7 @@
"semver": "7.3.2",
"serverless": "1.74.1",
"serverless-dotenv-plugin": "2.4.2",
- "webpack": "5.0.0-beta.16",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12"
}
}
diff --git a/streamed-federation/federated-middleware/package.json b/streamed-federation/federated-middleware/package.json
index 113bbb58d5f..e5d7f57cf75 100644
--- a/streamed-federation/federated-middleware/package.json
+++ b/streamed-federation/federated-middleware/package.json
@@ -21,7 +21,7 @@
"babel-loader": "8.1.0",
"copy-webpack-plugin": "6.0.2",
"serverless": "1.74.1",
- "webpack": "5.0.0-beta.16",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12"
}
}
diff --git a/typescript/app1/package.json b/typescript/app1/package.json
index 5aaa1b053d7..2d7f93fb41a 100644
--- a/typescript/app1/package.json
+++ b/typescript/app1/package.json
@@ -12,7 +12,7 @@
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
"typescript": "3.9.6",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/typescript/app1/public/index.html b/typescript/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/typescript/app1/public/index.html
+++ b/typescript/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/typescript/app1/webpack.config.js b/typescript/app1/webpack.config.js
index 50236cc223b..49aa730e84e 100644
--- a/typescript/app1/webpack.config.js
+++ b/typescript/app1/webpack.config.js
@@ -38,9 +38,8 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
shared: ["react", "react-dom"],
}),
diff --git a/typescript/app2/package.json b/typescript/app2/package.json
index c9c6b36e677..f45d94f2e39 100644
--- a/typescript/app2/package.json
+++ b/typescript/app2/package.json
@@ -12,7 +12,7 @@
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
"typescript": "3.9.6",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/version-discrepancy/app1/package.json b/version-discrepancy/app1/package.json
index f4b271f0aa2..4fff47d14f2 100644
--- a/version-discrepancy/app1/package.json
+++ b/version-discrepancy/app1/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/version-discrepancy/app1/public/index.html b/version-discrepancy/app1/public/index.html
index 1511cd8d858..19f0d60626e 100644
--- a/version-discrepancy/app1/public/index.html
+++ b/version-discrepancy/app1/public/index.html
@@ -1,7 +1,5 @@
-
-
-
+
diff --git a/version-discrepancy/app1/webpack.config.js b/version-discrepancy/app1/webpack.config.js
index f757bd2e872..09315152126 100644
--- a/version-discrepancy/app1/webpack.config.js
+++ b/version-discrepancy/app1/webpack.config.js
@@ -28,9 +28,8 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app1",
- library: { type: "var", name: "app1" },
remotes: {
- app2: "app2",
+ app2: "app2@http://localhost:3002/remoteEntry.js",
},
shared: {
react: "react",
diff --git a/version-discrepancy/app2/package.json b/version-discrepancy/app2/package.json
index ea230a88e29..a2f4c716185 100644
--- a/version-discrepancy/app2/package.json
+++ b/version-discrepancy/app2/package.json
@@ -8,7 +8,7 @@
"babel-loader": "8.1.0",
"html-webpack-plugin": "git://github.com/ScriptedAlchemy/html-webpack-plugin#master",
"serve": "11.3.2",
- "webpack": "5.0.0-beta.18",
+ "webpack": "5.0.0-beta.22",
"webpack-cli": "3.3.12",
"webpack-dev-server": "3.11.0"
},
diff --git a/version-discrepancy/app2/webpack.config.js b/version-discrepancy/app2/webpack.config.js
index 069fd1dcc64..98ab4e40e8d 100644
--- a/version-discrepancy/app2/webpack.config.js
+++ b/version-discrepancy/app2/webpack.config.js
@@ -29,7 +29,6 @@ module.exports = {
plugins: [
new ModuleFederationPlugin({
name: "app2",
- library: { type: "var", name: "app2" },
filename: "remoteEntry.js",
exposes: {
"./Example": "./src/Example",
diff --git a/yarn.lock b/yarn.lock
index ef88608360d..2e7759287be 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3018,11 +3018,6 @@
dependencies:
"@types/node" "*"
-"@types/estree@0.0.42":
- version "0.0.42"
- resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.42.tgz#8d0c1f480339efedb3e46070e22dd63e0430dd11"
- integrity sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==
-
"@types/estree@^0.0.45":
version "0.0.45"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.45.tgz#e9387572998e5ecdac221950dab3e8c3b16af884"
@@ -3673,7 +3668,7 @@ acorn@^6.2.1, acorn@^6.4.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474"
integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
-acorn@^7.0.0, acorn@^7.1.1, acorn@^7.2.0, acorn@^7.3.0:
+acorn@^7.1.1, acorn@^7.2.0, acorn@^7.3.0:
version "7.3.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.3.1.tgz#85010754db53c3fbaf3b9ea3e083aa5c5d147ffd"
integrity sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==
@@ -4786,7 +4781,7 @@ bytes@3.1.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
-cacache@13.0.1, cacache@^13.0.1:
+cacache@13.0.1:
version "13.0.1"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-13.0.1.tgz#a8000c21697089082f85287a1aec6e382024a71c"
integrity sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==
@@ -6827,9 +6822,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.413, electron-to-chromium@^1.3.488:
- version "1.3.494"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.494.tgz#0d2dba65b69d696c5b71abb37552ff055fb32a5c"
- integrity sha512-EOZuaDT3L1sCIMAVN5J0nGuGWVq5dThrdl0d8XeDYf4MOzbXqZ19OLKesN8TZj0RxtpYjqHpiw/fR6BKWdMwYA==
+ version "1.3.493"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.493.tgz#825d4335d053db27dafa72619ba9bae06f79f791"
+ integrity sha512-XI8utnmn79O57cYTS0Y2smVmxwQvVisp7T/5mHHrUnY6yVXaglssFFxiHmSAIBil3c5XmhCqkhcS9j237zj83A==
elliptic@^6.0.0, elliptic@^6.5.2:
version "6.5.3"
@@ -6965,22 +6960,6 @@ enhanced-resolve@4.1.1:
memory-fs "^0.5.0"
tapable "^1.0.0"
-enhanced-resolve@5.0.0-beta.4:
- version "5.0.0-beta.4"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.0.0-beta.4.tgz#a14a799c098c2c43ec2cd0b718b14a2eadec7301"
- integrity sha512-5/C1ZLbPbiFKM9WnF2LKvwresdLoKb0Py6r9XAt9gojZ6wnJb1ay2OzLY+T0DX5KSrimvTufAGISysArUlRpdQ==
- dependencies:
- graceful-fs "^4.2.0"
- tapable "^2.0.0-beta.8"
-
-enhanced-resolve@5.0.0-beta.7:
- version "5.0.0-beta.7"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.0.0-beta.7.tgz#174f085396ac8edc734253f5b6aa9a05cb0d73b2"
- integrity sha512-4r9mhIEedx7IsNgutSPyFtD0hKukbknr8Fuee36IXg9dYcAeDLb7l6LzBAeiDBgUKeFv+OgMSkCyp/SGCZ5Xag==
- dependencies:
- graceful-fs "^4.2.0"
- tapable "^2.0.0-beta.10"
-
enhanced-resolve@5.0.0-beta.8:
version "5.0.0-beta.8"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.0.0-beta.8.tgz#f399920cb9f73350e61ab10bf2c7f36c37dbf032"
@@ -9920,14 +9899,6 @@ jest-worker@25.1.0:
merge-stream "^2.0.0"
supports-color "^7.0.0"
-jest-worker@^25.4.0:
- version "25.5.0"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.5.0.tgz#2611d071b79cea0f43ee57a3d118593ac1547db1"
- integrity sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw==
- dependencies:
- merge-stream "^2.0.0"
- supports-color "^7.0.0"
-
jest-worker@^26.0.0, jest-worker@^26.1.0:
version "26.1.0"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.1.0.tgz#65d5641af74e08ccd561c240e7db61284f82f33d"
@@ -10421,11 +10392,6 @@ loader-runner@^2.4.0:
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357"
integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==
-loader-runner@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-3.1.0.tgz#e9440e5875f2ad2f968489cd2c7b59a4f2847fcb"
- integrity sha512-wE/bOCdTKMR2rm7Xxh+eirDOmN7Vx7hntWgiTayuFPtF8MgsFDo49SP8kkYz8IVlEBTOtR7P+XI7bE1xjo/IkA==
-
loader-runner@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.0.0.tgz#02abcfd9fe6ff7a5aeb3547464746c4dc6ba333d"
@@ -15416,17 +15382,12 @@ table@^5.2.3:
slice-ansi "^2.1.0"
string-width "^3.0.0"
-tapable@2.0.0-beta.9:
- version "2.0.0-beta.9"
- resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.0.0-beta.9.tgz#638496fb27b53e69c21a0e6a4435afbe805845cb"
- integrity sha512-+VBUuZXh+WIHnKOeo+A27SB/1sHTVWozcKweDIAhB/XOGnr8cy6ULZjU+qpGxO/G4xEyWCCaWTX/HPEkGg3Xrg==
-
tapable@^1.0.0, tapable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2"
integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==
-tapable@^2.0.0-beta.10, tapable@^2.0.0-beta.8:
+tapable@^2.0.0-beta.10:
version "2.0.0-beta.11"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.0.0-beta.11.tgz#5a6bd5e0353fad4da9e94942206bb596639e8cf7"
integrity sha512-cAhRzCvMdyJsxmdrSXG8/SUlJG4WJUxD/csuYAybUFjKVt74Y6pTyZ/I1ZK+enmCkWZN0JWxh14G69temaGSiA==
@@ -15527,21 +15488,6 @@ terser-webpack-plugin@^1.4.3:
webpack-sources "^1.4.0"
worker-farm "^1.7.0"
-terser-webpack-plugin@^2.3.6:
- version "2.3.7"
- resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-2.3.7.tgz#4910ff5d1a872168cc7fa6cd3749e2b0d60a8a0b"
- integrity sha512-xzYyaHUNhzgaAdBsXxk2Yvo/x1NJdslUaussK3fdpBbvttm1iIwU+c26dj9UxJcwk2c5UWt5F55MUTIA8BE7Dg==
- dependencies:
- cacache "^13.0.1"
- find-cache-dir "^3.3.1"
- jest-worker "^25.4.0"
- p-limit "^2.3.0"
- schema-utils "^2.6.6"
- serialize-javascript "^3.1.0"
- source-map "^0.6.1"
- terser "^4.6.12"
- webpack-sources "^1.4.3"
-
terser-webpack-plugin@^3.0.2:
version "3.0.6"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-3.0.6.tgz#db0a108bbdd3680d72c9b491fbabad09ba207b99"
@@ -15575,7 +15521,7 @@ terser@4.6.13:
source-map "~0.6.1"
source-map-support "~0.5.12"
-terser@^4.1.2, terser@^4.6.12, terser@^4.6.13, terser@^4.8.0:
+terser@^4.1.2, terser@^4.6.13, terser@^4.8.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.8.0.tgz#63056343d7c70bb29f3af665865a46fe03a0df17"
integrity sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==
@@ -16597,35 +16543,7 @@ webpack@4.43.0:
watchpack "^1.6.1"
webpack-sources "^1.4.1"
-webpack@5.0.0-beta.18:
- version "5.0.0-beta.18"
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.0.0-beta.18.tgz#ce49483c05cd9a130c133b68aba01d85c2193d58"
- integrity sha512-v+kyUEA1sQnSP6gcchyEY/Jufb1XEbniCmA7uXvWXWFPQnN51ChW8liF0FgUre8yYI5jRqVsNHFw3H9rGCB8qw==
- dependencies:
- "@types/estree" "0.0.42"
- "@webassemblyjs/ast" "1.9.0"
- "@webassemblyjs/helper-module-context" "1.9.0"
- "@webassemblyjs/wasm-edit" "1.9.0"
- "@webassemblyjs/wasm-parser" "1.9.0"
- acorn "^7.0.0"
- chrome-trace-event "^1.0.2"
- enhanced-resolve "5.0.0-beta.7"
- eslint-scope "^5.0.0"
- events "^3.0.0"
- glob-to-regexp "^0.4.1"
- graceful-fs "^4.1.15"
- json-parse-better-errors "^1.0.2"
- loader-runner "^3.1.0"
- mime-types "^2.1.26"
- neo-async "^2.6.1"
- pkg-dir "^4.2.0"
- schema-utils "^2.5.0"
- tapable "^2.0.0-beta.10"
- terser-webpack-plugin "^3.0.2"
- watchpack "2.0.0-beta.13"
- webpack-sources "2.0.0-beta.8"
-
-webpack@^5.0.0-beta.22:
+webpack@5.0.0-beta.22:
version "5.0.0-beta.22"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.0.0-beta.22.tgz#c5560c3b470ccab69c66273a3bcf314f85926bea"
integrity sha512-t3HnQPy88PASM2ur0rvUXau8vAz287BlH8DpiaHoWkjlLThLx7olzExtTsVJEFen/9uTfWOV21dWS8kiYmGLkA==
@@ -16653,33 +16571,6 @@ webpack@^5.0.0-beta.22:
watchpack "2.0.0-beta.13"
webpack-sources "2.0.0-beta.8"
-"webpack@file:angular-universal-ssr/patched_packages/webpack-5.0.0-beta.16.tgz":
- version "5.0.0-beta.16"
- resolved "file:angular-universal-ssr/patched_packages/webpack-5.0.0-beta.16.tgz#e749f8255c400f98a4bf46c1d28a5bc107776dc4"
- dependencies:
- "@webassemblyjs/ast" "1.9.0"
- "@webassemblyjs/helper-module-context" "1.9.0"
- "@webassemblyjs/wasm-edit" "1.9.0"
- "@webassemblyjs/wasm-parser" "1.9.0"
- acorn "^7.0.0"
- chrome-trace-event "^1.0.2"
- enhanced-resolve "5.0.0-beta.4"
- eslint-scope "^5.0.0"
- events "^3.0.0"
- glob-to-regexp "^0.4.1"
- graceful-fs "^4.1.15"
- json-parse-better-errors "^1.0.2"
- loader-runner "^3.1.0"
- loader-utils "^1.2.3"
- mime-types "^2.1.26"
- neo-async "^2.6.1"
- pkg-dir "^4.2.0"
- schema-utils "^2.5.0"
- tapable "2.0.0-beta.9"
- terser-webpack-plugin "^2.3.6"
- watchpack "2.0.0-beta.13"
- webpack-sources "2.0.0-beta.8"
-
websocket-driver@0.6.5:
version "0.6.5"
resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36"