Last active
June 4, 2020 14:36
-
-
Save Jordan-Gilliam/be8bf6503686428dc66a8915ef91fd34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ComponentB from "mfe-b/Component"; // <- these are remote modules, | |
import ComponentC from "mfe-c/Component"; // <- but they are used as usual packages | |
import { de } from "date-fns/locale"; | |
// remote modules can also be used with import() which lazy loads them as usual | |
const ComponentD = React.lazy(() => import("mfe-c/Component2")); | |
const App = () => ( | |
<article> | |
<header> | |
<h1>Hello World</h1> | |
</header> | |
<p>This component is from a remote container:</p> | |
<ComponentB locale={de} /> | |
<p>And this component is from another remote container:</p> | |
<ComponentC locale={de} /> | |
<React.Suspense fallback={<p>Lazy loading component...</p>}> | |
<p> | |
And this component is from this remote container too, but lazy loaded: | |
</p> | |
<ComponentD /> | |
</React.Suspense> | |
</article> | |
); | |
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactDom from "react-dom"; | |
import React from "react"; // <- this is a shared module, but used as usual | |
import App from "./App"; | |
// load app | |
const el = document.createElement("main"); | |
ReactDom.render(<App />, el); | |
document.body.appendChild(el); | |
// remove spinner | |
document.body.removeChild(document.getElementsByClassName("spinner")[0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******/ (() => { // webpackBootstrap | |
/******/ var __webpack_modules__ = ({ | |
/***/ 11: | |
/*!*********************************************!*\ | |
!*** external "mfeBBB@/dist/bbb/mfeBBB.js" ***! | |
\*********************************************/ | |
/*! unknown exports (runtime-defined) */ | |
/*! exports [maybe provided (runtime-defined)] [maybe used (runtime-defined)] */ | |
/*! runtime requirements: module, __webpack_require__.l, __webpack_require__.* */ | |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
"use strict"; | |
var error = new Error(); | |
module.exports = new Promise((resolve, reject) => { | |
if(typeof mfeBBB !== "undefined") return resolve(); | |
__webpack_require__.l("/dist/bbb/mfeBBB.js", (event) => { | |
if(typeof mfeBBB !== "undefined") return resolve(); | |
var errorType = event && (event.type === 'load' ? 'missing' : event.type); | |
var realSrc = event && event.target && event.target.src; | |
error.message = 'Loading script failed.\n(' + errorType + ': ' + realSrc + ')'; | |
error.name = 'ScriptExternalLoadError'; | |
error.type = errorType; | |
error.request = realSrc; | |
reject(error); | |
}, "mfeBBB"); | |
}).then(() => mfeBBB) | |
/***/ }), | |
/***/ 13: | |
/*!*********************************************!*\ | |
!*** external "mfeCCC@/dist/ccc/mfeCCC.js" ***! | |
\*********************************************/ | |
/*! unknown exports (runtime-defined) */ | |
/*! exports [maybe provided (runtime-defined)] [maybe used (runtime-defined)] */ | |
/*! runtime requirements: module, __webpack_require__.l, __webpack_require__.* */ | |
/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
"use strict"; | |
var error = new Error(); | |
module.exports = new Promise((resolve, reject) => { | |
if(typeof mfeCCC !== "undefined") return resolve(); | |
__webpack_require__.l("/dist/ccc/mfeCCC.js", (event) => { | |
if(typeof mfeCCC !== "undefined") return resolve(); | |
var errorType = event && (event.type === 'load' ? 'missing' : event.type); | |
var realSrc = event && event.target && event.target.src; | |
error.message = 'Loading script failed.\n(' + errorType + ': ' + realSrc + ')'; | |
error.name = 'ScriptExternalLoadError'; | |
error.type = errorType; | |
error.request = realSrc; | |
reject(error); | |
}, "mfeCCC"); | |
}).then(() => mfeCCC) | |
/***/ }) | |
/******/ }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mfeBBB;mfeBBB = | |
/******/ (() => { // webpackBootstrap | |
/******/ "use strict"; | |
/******/ var __webpack_modules__ = ([ | |
/* 0 */ | |
/*!***********************!*\ | |
!*** container entry ***! | |
\***********************/ | |
/*! unknown exports (runtime-defined) */ | |
/*! exports [maybe provided (runtime-defined)] [maybe used (runtime-defined)] */ | |
/*! runtime requirements: __webpack_require__.d, __webpack_require__.o, __webpack_exports__, __webpack_require__.e, __webpack_require__, __webpack_require__.* */ | |
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
var moduleMap = { | |
"./Component": () => { | |
return __webpack_require__.e("src-b_Component_js").then(() => () => (__webpack_require__(/*! ./src-b/Component */ 3))); | |
} | |
}; | |
var get = (module) => { | |
return ( | |
__webpack_require__.o(moduleMap, module) | |
? moduleMap[module]() | |
: Promise.resolve().then(() => { | |
throw new Error('Module "' + module + '" does not exist in container.'); | |
}) | |
); | |
}; | |
var init = (shareScope) => { | |
var oldScope = __webpack_require__.S["default"]; | |
var name = "default" | |
if(oldScope && oldScope !== shareScope) throw new Error("Container initialization failed as it has already been initialized with a different share scope"); | |
__webpack_require__.S[name] = shareScope; | |
return __webpack_require__.I(name); | |
}; | |
// This exports getters to disallow modifications | |
__webpack_require__.d(exports, { | |
get: () => get, | |
init: () => init | |
}); | |
/***/ }) | |
/******/ ]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
/*!**********************!*\ | |
!*** ./src/index.js ***! | |
\**********************/ | |
/*! unknown exports (runtime-defined) */ | |
/*! exports [maybe provided (runtime-defined)] [unused] */ | |
/*! runtime requirements: __webpack_require__.e, __webpack_require__, __webpack_require__.* */ | |
// Sharing modules requires that all remotes are initialized | |
// and can provide shared modules to the common scope | |
// As this is an async operation we need an async boundary (import()) | |
// Using modules from remotes is also an async operation | |
// as chunks need to be loaded for the code of the remote module | |
// This also requires an async boundary (import()) | |
// At this point shared modules initialized and remote modules are loaded | |
__webpack_require__.e(/*! import() */ "src_bootstrap_js").then(__webpack_require__.bind(__webpack_require__, /*! ./bootstrap */ 2)); // It's possible to place more code here to do stuff on page init | |
// but it can't use any of the shared modules or remote modules. | |
})(); | |
/******/ })() | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
.spinner { | |
font-size: 10px; | |
margin: 50px auto; | |
text-indent: -9999em; | |
width: 11em; | |
height: 11em; | |
border-radius: 50%; | |
background: #595959; | |
background: linear-gradient( | |
to right, | |
#595959 10%, | |
rgba(89, 89, 89, 0) 42% | |
); | |
position: relative; | |
animation: spin 1.4s infinite linear; | |
transform: translateZ(0); | |
} | |
.spinner:before { | |
width: 50%; | |
height: 50%; | |
background: #595959; | |
border-radius: 100% 0 0 0; | |
position: absolute; | |
top: 0; | |
left: 0; | |
content: ""; | |
} | |
.spinner:after { | |
background: white; | |
width: 75%; | |
height: 75%; | |
border-radius: 50%; | |
content: ""; | |
margin: auto; | |
position: absolute; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
} | |
@-webkit-keyframes spin { | |
0% { | |
-webkit-transform: rotate(0deg); | |
transform: rotate(0deg); | |
} | |
100% { | |
-webkit-transform: rotate(360deg); | |
transform: rotate(360deg); | |
} | |
} | |
@keyframes spin { | |
0% { | |
-webkit-transform: rotate(0deg); | |
transform: rotate(0deg); | |
} | |
100% { | |
-webkit-transform: rotate(360deg); | |
transform: rotate(360deg); | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<!-- A spinner --> | |
<div class="spinner"></div> | |
<!-- This script only contains boostrapping logic --> | |
<!-- It will load all other scripts if neccessary --> | |
<script src="/dist/aaa/app.js" async></script> | |
<!-- These script tags are optional --> | |
<!-- They improve loading performance --> | |
<!-- Omitting them will add an additional round trip --> | |
<script src="/dist/bbb/mfeBBB.js" async></script> | |
<script src="/dist/ccc/mfeCCC.js" async></script> | |
<!-- All these scripts are pretty small ~5kb --> | |
<!-- For optimal performance they can be inlined --> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sharing modules requires that all remotes are initialized | |
// and can provide shared modules to the common scope | |
// As this is an async operation we need an async boundary (import()) | |
// Using modules from remotes is also an async operation | |
// as chunks need to be loaded for the code of the remote module | |
// This also requires an async boundary (import()) | |
// At this point shared modules initialized and remote modules are loaded | |
import("./bootstrap"); | |
// It's possible to place more code here to do stuff on page init | |
// but it can't use any of the shared modules or remote modules. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
const { ModuleFederationPlugin } = require("../../").container; | |
const devDeps = require("../../package.json").devDependencies; | |
const rules = [ | |
{ | |
test: /\.js$/, | |
include: path.resolve(__dirname, "src"), | |
use: { | |
loader: "babel-loader", | |
options: { | |
presets: ["@babel/react"] | |
} | |
} | |
} | |
]; | |
const optimization = { | |
chunkIds: "named", // for this example only: readable filenames in production too | |
nodeEnv: "production" // for this example only: always production version of react | |
}; | |
const stats = { | |
chunks: true, | |
modules: false, | |
chunkModules: false, | |
chunkRootModules: true, | |
chunkOrigins: true | |
}; | |
module.exports = (env = "development") => [ | |
{ | |
name: "app", | |
mode: env, | |
entry: { | |
app: "./src/index.js" | |
}, | |
output: { | |
filename: "[name].js", | |
path: path.resolve(__dirname, "dist/aaa"), | |
publicPath: "dist/aaa/", | |
// Each build needs a unique name | |
// to avoid runtime collisions | |
// The default uses "name" from package.json | |
uniqueName: "module-federation-aaa" | |
}, | |
module: { rules }, | |
optimization, | |
plugins: [ | |
new ModuleFederationPlugin({ | |
// List of remotes with URLs | |
remotes: { | |
"mfe-b": "mfeBBB@/dist/bbb/mfeBBB.js", | |
"mfe-c": "mfeCCC@/dist/ccc/mfeCCC.js" | |
}, | |
// list of shared modules with version requirement and other options | |
shared: { | |
react: { | |
singleton: true, // make sure only a single react module is used | |
requiredVersion: devDeps.react // e. g. "^16.8.0" | |
} | |
} | |
}) | |
], | |
stats | |
}, | |
{ | |
name: "mfe-b", | |
mode: env, | |
entry: {}, | |
output: { | |
filename: "[name].js", | |
path: path.resolve(__dirname, "dist/bbb"), | |
publicPath: "dist/bbb/", | |
uniqueName: "module-federation-bbb" | |
}, | |
module: { rules }, | |
optimization, | |
plugins: [ | |
new ModuleFederationPlugin({ | |
// A unique name | |
name: "mfeBBB", | |
// List of exposed modules | |
exposes: { | |
"./Component": "./src-b/Component" | |
}, | |
// list of shared modules with version requirement and other options | |
// Here date-fns is shared with the other remote, host doesn't know about that | |
shared: { | |
"date-fns": devDeps["date-fns"], // e. g. "^2.12.0" | |
react: { | |
singleton: true, // must be specified in each config | |
requiredVersion: devDeps.react | |
} | |
} | |
}) | |
], | |
stats | |
}, | |
{ | |
name: "mfe-c", | |
mode: env, | |
entry: {}, | |
output: { | |
filename: "[name].js", | |
path: path.resolve(__dirname, "dist/ccc"), | |
publicPath: "dist/ccc/", | |
uniqueName: "module-federation-ccc" | |
}, | |
module: { rules }, | |
optimization, | |
plugins: [ | |
new ModuleFederationPlugin({ | |
name: "mfeCCC", | |
exposes: { | |
"./Component": "./src-c/Component", | |
"./Component2": "./src-c/LazyComponent" | |
}, | |
shared: { | |
"date-fns": devDeps["date-fns"], | |
lodash: devDeps["lodash"], | |
react: { | |
singleton: true, | |
requiredVersion: devDeps.react | |
} | |
} | |
}) | |
], | |
stats | |
} | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { formatRelative, subDays } from "date-fns"; | |
// date-fns is a shared module, but used as usual | |
// exposing modules act as async boundary, | |
// so no additional async boundary need to be added here | |
// As data-fns is an shared module, it will be placed in a separate file | |
// It will be loaded in parallel to the code of this module | |
const Component = ({ locale }) => ( | |
<div style={{ border: "5px solid darkblue" }}> | |
<p>I'm a Component exposed from container B!</p> | |
<p> | |
Using date-fn in Remote:{" "} | |
{formatRelative(subDays(new Date(), 2), new Date(), { locale })} | |
</p> | |
</div> | |
); | |
export default Component; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************/ | |
/******/ // The module cache | |
/******/ var __webpack_module_cache__ = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ // Check if module is in cache | |
/******/ if(__webpack_module_cache__[moduleId]) { | |
/******/ return __webpack_module_cache__[moduleId].exports; | |
/******/ } | |
/******/ // Create a new module (and put it into the cache) | |
/******/ var module = __webpack_module_cache__[moduleId] = { | |
/******/ // no module.id needed | |
/******/ // no module.loaded needed | |
/******/ exports: {} | |
/******/ }; | |
/******/ | |
/******/ // Execute the module function | |
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
/******/ | |
/******/ // Return the exports of the module | |
/******/ return module.exports; | |
/******/ } | |
/******/ | |
/******/ // expose the modules object (__webpack_modules__) | |
/******/ __webpack_require__.m = __webpack_modules__; | |
/******/ | |
/************************************************************************/ | |
/******/ /* webpack/runtime/compat get default export */ | |
/******/ (() => { | |
/******/ // getDefaultExport function for compatibility with non-harmony modules | |
/******/ __webpack_require__.n = (module) => { | |
/******/ var getter = module && module.__esModule ? | |
/******/ () => module['default'] : | |
/******/ () => module; | |
/******/ __webpack_require__.d(getter, { a: getter }); | |
/******/ return getter; | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/create fake namespace object */ | |
/******/ (() => { | |
/******/ // create a fake namespace object | |
/******/ // mode & 1: value is a module id, require it | |
/******/ // mode & 2: merge all properties of value into the ns | |
/******/ // mode & 4: return value when already ns object | |
/******/ // mode & 8|1: behave like require | |
/******/ __webpack_require__.t = function(value, mode) { | |
/******/ if(mode & 1) value = this(value); | |
/******/ if(mode & 8) return value; | |
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; | |
/******/ var ns = Object.create(null); | |
/******/ __webpack_require__.r(ns); | |
/******/ var def = {}; | |
/******/ if(mode & 2 && typeof value == 'object' && value) { | |
/******/ for(const key in value) def[key] = () => value[key]; | |
/******/ } | |
/******/ def['default'] = () => value; | |
/******/ __webpack_require__.d(ns, def); | |
/******/ return ns; | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/define property getters */ | |
/******/ (() => { | |
/******/ // define getter functions for harmony exports | |
/******/ __webpack_require__.d = (exports, definition) => { | |
/******/ for(var key in definition) { | |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
/******/ } | |
/******/ } | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/ensure chunk */ | |
/******/ (() => { | |
/******/ __webpack_require__.f = {}; | |
/******/ // This file contains only the entry chunk. | |
/******/ // The chunk loading function for additional chunks | |
/******/ __webpack_require__.e = (chunkId) => { | |
/******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { | |
/******/ __webpack_require__.f[key](chunkId, promises); | |
/******/ return promises; | |
/******/ }, [])); | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/get javascript chunk filename */ | |
/******/ (() => { | |
/******/ // This function allow to reference async chunks | |
/******/ __webpack_require__.u = (chunkId) => { | |
/******/ // return url for filenames based on template | |
/******/ return "" + chunkId + ".js"; | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
/******/ (() => { | |
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/load script */ | |
/******/ (() => { | |
/******/ var inProgress = {}; | |
/******/ // loadScript function to load a script via script tag | |
/******/ __webpack_require__.l = (url, done, key) => { | |
/******/ if(inProgress[url]) { inProgress[url].push(done); return; } | |
/******/ var script, needAttach; | |
/******/ if(key !== undefined) { | |
/******/ var scripts = document.getElementsByTagName("script"); | |
/******/ for(var i = 0; i < scripts.length; i++) { | |
/******/ var s = scripts[i]; | |
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == key) { script = s; break; } | |
/******/ } | |
/******/ } | |
/******/ if(!script) { | |
/******/ needAttach = true; | |
/******/ script = document.createElement('script'); | |
/******/ | |
/******/ script.charset = 'utf-8'; | |
/******/ script.timeout = 120; | |
/******/ if (__webpack_require__.nc) { | |
/******/ script.setAttribute("nonce", __webpack_require__.nc); | |
/******/ } | |
/******/ script.setAttribute("data-webpack", key); | |
/******/ script.src = url; | |
/******/ } | |
/******/ inProgress[url] = [done]; | |
/******/ var onScriptComplete = (event) => { | |
/******/ onScriptComplete = () => { | |
/******/ | |
/******/ } | |
/******/ // avoid mem leaks in IE. | |
/******/ script.onerror = script.onload = null; | |
/******/ clearTimeout(timeout); | |
/******/ var doneFns = inProgress[url]; | |
/******/ delete inProgress[url]; | |
/******/ script.parentNode.removeChild(script); | |
/******/ doneFns && doneFns.forEach((fn) => fn(event)); | |
/******/ } | |
/******/ ; | |
/******/ var timeout = setTimeout(() => { | |
/******/ onScriptComplete({ type: 'timeout', target: script }) | |
/******/ }, 120000); | |
/******/ script.onerror = script.onload = onScriptComplete; | |
/******/ needAttach && document.head.appendChild(script); | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/make namespace object */ | |
/******/ (() => { | |
/******/ // define __esModule on exports | |
/******/ __webpack_require__.r = (exports) => { | |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
/******/ } | |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/publicPath */ | |
/******/ (() => { | |
/******/ __webpack_require__.p = "dist/aaa/"; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/remotes loading */ | |
/******/ (() => { | |
/******/ var installedModules = {}; | |
/******/ var chunkMapping = { | |
/******/ "src_bootstrap_js": [ | |
/******/ 10, | |
/******/ 12 | |
/******/ ], | |
/******/ "webpack_container_remote_mfe-c_Component2": [ | |
/******/ 26 | |
/******/ ] | |
/******/ }; | |
/******/ var idToExternalAndNameMapping = { | |
/******/ "10": [ | |
/******/ "default", | |
/******/ "./Component", | |
/******/ 11 | |
/******/ ], | |
/******/ "12": [ | |
/******/ "default", | |
/******/ "./Component", | |
/******/ 13 | |
/******/ ], | |
/******/ "26": [ | |
/******/ "default", | |
/******/ "./Component2", | |
/******/ 13 | |
/******/ ] | |
/******/ }; | |
/******/ __webpack_require__.f.remotes = (chunkId, promises) => { | |
/******/ if(__webpack_require__.o(chunkMapping, chunkId)) { | |
/******/ chunkMapping[chunkId].forEach((id) => { | |
/******/ if(installedModules[id]) return promises.push(installedModules[id]); | |
/******/ var data = idToExternalAndNameMapping[id]; | |
/******/ var onError = (error) => { | |
/******/ if(!error) error = new Error("Container missing"); | |
/******/ if(typeof error.message === "string") | |
/******/ error.message += '\nwhile loading "' + data[1] + '" from ' + data[2]; | |
/******/ __webpack_modules__[id] = () => { | |
/******/ throw error; | |
/******/ } | |
/******/ installedModules[id] = 0; | |
/******/ }; | |
/******/ var handleFunction = (fn, key, data, next, first) => { | |
/******/ try { | |
/******/ var promise = fn(key, data); | |
/******/ if(promise && promise.then) { | |
/******/ var p = promise.then((result) => next(result, data), onError); | |
/******/ if(first) promises.push(installedModules[id] = p); else return p; | |
/******/ } else { | |
/******/ return next(promise, data, first); | |
/******/ } | |
/******/ } catch(error) { | |
/******/ onError(error); | |
/******/ } | |
/******/ } | |
/******/ var onExternal = (external, _, first) => external ? handleFunction(__webpack_require__.I, data[0], external, onInitialized, first) : onError(); | |
/******/ var onInitialized = (_, external, first) => handleFunction(external.get, data[1], external, onFactory, first); | |
/******/ var onFactory = (factory) => { | |
/******/ installedModules[id] = 1; | |
/******/ __webpack_modules__[id] = (module) => { | |
/******/ module.exports = factory(); | |
/******/ } | |
/******/ }; | |
/******/ handleFunction(__webpack_require__, data[2], 1, onExternal, 1); | |
/******/ }); | |
/******/ } | |
/******/ } | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/sharing */ | |
/******/ (() => { | |
/******/ __webpack_require__.S = {}; | |
/******/ var initPromises = {}; | |
/******/ __webpack_require__.I = (name) => { | |
/******/ // only runs once | |
/******/ if(initPromises[name]) return initPromises[name]; | |
/******/ // handling circular init calls | |
/******/ initPromises[name] = 1; | |
/******/ // creates a new share scope if needed | |
/******/ if(!__webpack_require__.o(__webpack_require__.S, name)) __webpack_require__.S[name] = {}; | |
/******/ // runs all init snippets from all modules reachable | |
/******/ var scope = __webpack_require__.S[name]; | |
/******/ var warn = (msg) => typeof console !== "undefined" && console.warn && console.warn(msg);; | |
/******/ var register = (name, version, factory, currentName) => { | |
/******/ version = version || []; | |
/******/ currentName = name; | |
/******/ var versionConflict = () => warn("Version conflict for shared modules: " + name + " " + (v && v.join(".")) + " <=> " + (version && version.join(".")));; | |
/******/ var registerCurrent = () => { | |
/******/ if(scope[currentName]) { | |
/******/ var v = scope[currentName].version || []; | |
/******/ for(var i = 0; i < version.length && i < v.length; i++) { | |
/******/ if(v[i] != version[i]) { // loose equal is intentional to match string and number | |
/******/ if(typeof v[i] === "string" || typeof version[i] === "string") return versionConflict(); | |
/******/ if(v[i] > version[i]) return; | |
/******/ if(v[i] < version[i]) { i = -1; break; } | |
/******/ } | |
/******/ } | |
/******/ if(i >= 0 && version.length <= v.length) return; | |
/******/ if(scope[currentName].loaded) return warn("Ignoring providing of already used shared module: " + name); | |
/******/ } | |
/******/ scope[currentName] = { get: factory, version: version }; | |
/******/ }; | |
/******/ registerCurrent(); | |
/******/ version.forEach((part) => { | |
/******/ currentName += "`" + part; | |
/******/ registerCurrent(); | |
/******/ }); | |
/******/ }; | |
/******/ var initExternal = (id) => { | |
/******/ var handleError = (err) => warn("Initialization of sharing external failed: " + err); | |
/******/ try { | |
/******/ var module = __webpack_require__(id); | |
/******/ if(!module) return; | |
/******/ var initFn = (module) => module && module.init && module.init(__webpack_require__.S[name]) | |
/******/ if(module.then) return promises.push(module.then(initFn, handleError)); | |
/******/ var initResult = initFn(module); | |
/******/ if(initResult && initResult.then) return promises.push(initResult.catch(handleError)); | |
/******/ } catch(err) { handleError(err); } | |
/******/ } | |
/******/ var promises = []; | |
/******/ switch(name) { | |
/******/ case "default": { | |
/******/ register("react", [16,13,1], () => __webpack_require__.e("node_modules_react_index_js-_11190").then(() => () => __webpack_require__(/*! react */ 24))); | |
/******/ initExternal(11); | |
/******/ initExternal(13); | |
/******/ } | |
/******/ break; | |
/******/ } | |
/******/ return promises.length && (initPromises[name] = Promise.all(promises).then(() => initPromises[name] = 1)); | |
/******/ }; | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/consumes */ | |
/******/ (() => { | |
/******/ var ensureExistence = (scope, scopeName, key) => { | |
/******/ if(!scope || !__webpack_require__.o(scope, key)) throw new Error("Shared module " + key + " doesn't exist in shared scope " + scopeName); | |
/******/ }; | |
/******/ var invalidVersion = (version, requiredVersion) => { | |
/******/ for(var i = 0; i < requiredVersion.length; i++) { | |
/******/ if(i === version.length) return 1; | |
/******/ if(version[i] != requiredVersion[i]) { // loose equal is intentional to match string and number | |
/******/ if(typeof version[i] === "string" || typeof requiredVersion[i] === "string" || version[i] < requiredVersion[i]) return 1; | |
/******/ if(version[i] > requiredVersion[i]) return; | |
/******/ } | |
/******/ } | |
/******/ }; | |
/******/ var checkSingletonVersion = (key, version, requiredVersion, strict) => { | |
/******/ if(!invalidVersion(version, requiredVersion)) return 1; | |
/******/ var msg = "Unsatisfied version of shared singleton module " + key + "@" + (version && version.join(".")) + " (required " + key + "@" + requiredVersion.join(".") + ")"; | |
/******/ if(strict) throw new Error(msg); | |
/******/ typeof console !== "undefined" && console.warn && console.warn(msg); | |
/******/ }; | |
/******/ var findVersion = (scope, key, requiredVersion, strict) => { | |
/******/ requiredVersion = requiredVersion || []; | |
/******/ var currentName = key; | |
/******/ var versions = requiredVersion.map((v) => currentName += "`" + v); | |
/******/ versions.unshift(key); | |
/******/ var lastVersion; | |
/******/ while(currentName = versions.shift()) { | |
/******/ if(__webpack_require__.o(scope, currentName) && !invalidVersion(lastVersion = scope[currentName].version || [], requiredVersion)) return scope[currentName]; | |
/******/ } | |
/******/ var msg = "Unsatisfied version of shared module " + key + "@" + (lastVersion && lastVersion.join(".")) + " (required " + key + "@" + requiredVersion.join(".") + ")"; | |
/******/ if(strict) throw new Error(msg); | |
/******/ typeof console !== "undefined" && console.warn && console.warn(msg); | |
/******/ }; | |
/******/ var get = (sharedModule) => (sharedModule.loaded = 1, sharedModule.get()); | |
/******/ var load = (scopeName, key) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ ensureExistence(scope, scopeName, key); | |
/******/ return get(scope[key]); | |
/******/ }; | |
/******/ var loadFallback = (scopeName, key, fallback) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ return scope && __webpack_require__.o(scope, key) ? get(scope[key]) : fallback(); | |
/******/ }; | |
/******/ var loadVersionCheck = (scopeName, key, version) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ ensureExistence(scope, scopeName, key); | |
/******/ return get(findVersion(scope, key, version) || scope[key]); | |
/******/ }; | |
/******/ var loadSingletonVersionCheck = (scopeName, key, version) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ ensureExistence(scope, scopeName, key); | |
/******/ checkSingletonVersion(key, scope[key].version, version); | |
/******/ return get(scope[key]); | |
/******/ }; | |
/******/ var loadStrictVersionCheck = (scopeName, key, version) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ ensureExistence(scope, scopeName, key); | |
/******/ return get(findVersion(scope, key, version, 1)); | |
/******/ }; | |
/******/ var loadStrictSingletonVersionCheck = (scopeName, key, version) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ ensureExistence(scope, scopeName, key); | |
/******/ checkSingletonVersion(key, scope[key].version, version, 1); | |
/******/ return get(scope[key]); | |
/******/ }; | |
/******/ var loadVersionCheckFallback = (scopeName, key, version, fallback) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ if(!scope || !__webpack_require__.o(scope, key)) return fallback(); | |
/******/ return get(findVersion(scope, key, version) || scope[key]); | |
/******/ }; | |
/******/ var loadSingletonVersionCheckFallback = (scopeName, key, version, fallback) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ if(!scope || !__webpack_require__.o(scope, key)) return fallback(); | |
/******/ checkSingletonVersion(key, scope[key].version, version); | |
/******/ return get(scope[key]); | |
/******/ }; | |
/******/ var loadStrictVersionCheckFallback = (scopeName, key, version, fallback) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ var entry = scope && findVersion(scope, key, version); | |
/******/ return entry ? get(entry) : fallback(); | |
/******/ }; | |
/******/ var loadStrictSingletonVersionCheckFallback = (scopeName, key, version, fallback) => { | |
/******/ __webpack_require__.I(scopeName); | |
/******/ var scope = __webpack_require__.S[scopeName]; | |
/******/ if(!scope || !__webpack_require__.o(scope, key)) return fallback(); | |
/******/ checkSingletonVersion(key, scope[key].version, version, 1); | |
/******/ return get(scope[key]); | |
/******/ }; | |
/******/ var installedModules = {}; | |
/******/ var moduleToHandlerMapping = { | |
/******/ 5: () => loadSingletonVersionCheckFallback("default", "react", ["16",8,0], () => __webpack_require__.e("node_modules_react_index_js-_11191").then(() => () => __webpack_require__(/*! react */ 24))) | |
/******/ }; | |
/******/ // no consumes in initial chunks | |
/******/ var chunkMapping = { | |
/******/ "src_bootstrap_js": [ | |
/******/ 5 | |
/******/ ] | |
/******/ }; | |
/******/ __webpack_require__.f.consumes = (chunkId, promises) => { | |
/******/ if(__webpack_require__.o(chunkMapping, chunkId)) { | |
/******/ chunkMapping[chunkId].forEach((id) => { | |
/******/ if(__webpack_require__.o(installedModules, id)) return promises.push(installedModules[id]); | |
/******/ var onFactory = (factory) => { | |
/******/ installedModules[id] = 0; | |
/******/ __webpack_modules__[id] = (module) => { | |
/******/ delete __webpack_module_cache__[id]; | |
/******/ module.exports = factory(); | |
/******/ } | |
/******/ }; | |
/******/ var onError = (error) => { | |
/******/ delete installedModules[id]; | |
/******/ __webpack_modules__[id] = (module) => { | |
/******/ delete __webpack_module_cache__[id]; | |
/******/ throw error; | |
/******/ } | |
/******/ }; | |
/******/ try { | |
/******/ var promise = moduleToHandlerMapping[id](); | |
/******/ if(promise.then) { | |
/******/ promises.push(installedModules[id] = promise.then(onFactory).catch(onError)); | |
/******/ } else onFactory(promise); | |
/******/ } catch(e) { onError(e); } | |
/******/ }); | |
/******/ } | |
/******/ } | |
/******/ })(); | |
/******/ | |
/******/ /* webpack/runtime/jsonp chunk loading */ | |
/******/ (() => { | |
/******/ // object to store loaded and loading chunks | |
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched | |
/******/ // Promise = chunk loading, 0 = chunk loaded | |
/******/ var installedChunks = { | |
/******/ "app": 0 | |
/******/ }; | |
/******/ | |
/******/ | |
/******/ __webpack_require__.f.j = (chunkId, promises) => { | |
/******/ // JSONP chunk loading for javascript | |
/******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined; | |
/******/ if(installedChunkData !== 0) { // 0 means "already installed". | |
/******/ | |
/******/ // a Promise means "currently loading". | |
/******/ if(installedChunkData) { | |
/******/ promises.push(installedChunkData[2]); | |
/******/ } else { | |
/******/ if("webpack_container_remote_mfe-c_Component2" != chunkId) { | |
/******/ // setup Promise in chunk cache | |
/******/ var promise = new Promise((resolve, reject) => { | |
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; | |
/******/ }); | |
/******/ promises.push(installedChunkData[2] = promise); | |
/******/ | |
/******/ // start chunk loading | |
/******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId); | |
/******/ // create error before stack unwound to get useful stacktrace later | |
/******/ var error = new Error(); | |
/******/ var loadingEnded = (event) => { | |
/******/ if(__webpack_require__.o(installedChunks, chunkId)) { | |
/******/ installedChunkData = installedChunks[chunkId]; | |
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined; | |
/******/ if(installedChunkData) { | |
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type); | |
/******/ var realSrc = event && event.target && event.target.src; | |
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')'; | |
/******/ error.name = 'ChunkLoadError'; | |
/******/ error.type = errorType; | |
/******/ error.request = realSrc; | |
/******/ installedChunkData[1](error); | |
/******/ } | |
/******/ } | |
/******/ }; | |
/******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId); | |
/******/ } else installedChunks[chunkId] = 0; | |
/******/ } | |
/******/ } | |
/******/ }; | |
/******/ | |
/******/ // no prefetching | |
/******/ | |
/******/ // no preloaded | |
/******/ | |
/******/ // no HMR | |
/******/ | |
/******/ // no HMR manifest | |
/******/ | |
/******/ // no deferred startup | |
/******/ | |
/******/ // install a JSONP callback for chunk loading | |
/******/ function webpackJsonpCallback(data) { | |
/******/ var chunkIds = data[0]; | |
/******/ var moreModules = data[1]; | |
/******/ | |
/******/ var runtime = data[3]; | |
/******/ // add "moreModules" to the modules object, | |
/******/ // then flag all "chunkIds" as loaded and fire callback | |
/******/ var moduleId, chunkId, i = 0, resolves = []; | |
/******/ for(;i < chunkIds.length; i++) { | |
/******/ chunkId = chunkIds[i]; | |
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { | |
/******/ resolves.push(installedChunks[chunkId][0]); | |
/******/ } | |
/******/ installedChunks[chunkId] = 0; | |
/******/ } | |
/******/ for(moduleId in moreModules) { | |
/******/ if(__webpack_require__.o(moreModules, moduleId)) { | |
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; | |
/******/ } | |
/******/ } | |
/******/ if(runtime) runtime(__webpack_require__); | |
/******/ if(parentJsonpFunction) parentJsonpFunction(data); | |
/******/ while(resolves.length) { | |
/******/ resolves.shift()(); | |
/******/ } | |
/******/ | |
/******/ }; | |
/******/ | |
/******/ var jsonpArray = window["webpackJsonpmodule_federation_aaa"] = window["webpackJsonpmodule_federation_aaa"] || []; | |
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); | |
/******/ jsonpArray.push = webpackJsonpCallback; | |
/******/ var parentJsonpFunction = oldJsonpFunction; | |
/******/ })(); | |
/******/ | |
/************************************************************************/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment