Web: Doceditor: refactoring
This commit is contained in:
parent
22b4928bbd
commit
55abc94977
@ -11,6 +11,7 @@ export function loadComponent(scope, module, moduleName = null) {
|
|||||||
const container = window[scope]; // or get the container somewhere else
|
const container = window[scope]; // or get the container somewhere else
|
||||||
// Initialize the container, it may provide shared modules
|
// Initialize the container, it may provide shared modules
|
||||||
await container.init(__webpack_share_scopes__.default);
|
await container.init(__webpack_share_scopes__.default);
|
||||||
|
console.log(container);
|
||||||
const factory = await window[scope].get(module);
|
const factory = await window[scope].get(module);
|
||||||
const Module = factory();
|
const Module = factory();
|
||||||
if (moduleName)
|
if (moduleName)
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { getFavicon } from "../helpers/utils";
|
import { getFavicon } from "../helpers/utils";
|
||||||
import pkg from "../../package.json";
|
import pkg from "../../package.json";
|
||||||
import { FILES_SCOPE, FILES_REMOTE_ENTRY_URL } from "../helpers/constants";
|
import {
|
||||||
|
FILES_SCOPE,
|
||||||
|
FILES_REMOTE_ENTRY_URL,
|
||||||
|
STUDIO_SCOPE,
|
||||||
|
STUDIO_REMOTE_ENTRY_URL,
|
||||||
|
} from "../helpers/constants";
|
||||||
|
|
||||||
export default function template(
|
export default function template(
|
||||||
initialState = {},
|
initialState = {},
|
||||||
@ -23,7 +28,6 @@ export default function template(
|
|||||||
window.initialLanguage = '${initialLanguage}'
|
window.initialLanguage = '${initialLanguage}'
|
||||||
</script>
|
</script>
|
||||||
<script type='text/javascript' id='scripDocServiceAddress' src="${docApiUrl}" async></script>
|
<script type='text/javascript' id='scripDocServiceAddress' src="${docApiUrl}" async></script>
|
||||||
<script id=${FILES_SCOPE} src=${FILES_REMOTE_ENTRY_URL} type="text/javascript" async=""></script>
|
|
||||||
${scriptTags}
|
${scriptTags}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -45,6 +49,8 @@ export default function template(
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<link rel="apple-touch-icon" href="/appIcon.png" />
|
<link rel="apple-touch-icon" href="/appIcon.png" />
|
||||||
${styleTags}
|
${styleTags}
|
||||||
|
<script id=${FILES_SCOPE} src=${FILES_REMOTE_ENTRY_URL} type="text/javascript" async=""></script>
|
||||||
|
<script id=${STUDIO_SCOPE} src=${STUDIO_REMOTE_ENTRY_URL} type="text/javascript" async=""></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root">${content}</div>
|
<div id="root">${content}</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user