@@ -17,28 +17,28 @@ module.exports = composePlugins(withNx(), withReact(), (config, context) => {
17
17
name : 'runtime_host' ,
18
18
remotes : {
19
19
// remote2: 'runtime_remote2@http://localhost:3007/remoteEntry.js',
20
- // remote1: 'runtime_remote1@http://127.0.0.1:3006/mf-manifest.json',
21
- remote1 : `promise new Promise((resolve)=>{
22
- const raw = 'runtime_remote1@http://127.0.0.1:3006/remoteEntry.js'
23
- const [_, remoteUrlWithVersion] = raw.split('@')
24
- const script = document.createElement('script')
25
- script.src = remoteUrlWithVersion
26
- script.onload = () => {
27
- const proxy = {
28
- get: (request) => window.runtime_remote1.get(request),
29
- init: (arg) => {
30
- try {
31
- return window.runtime_remote1.init(arg)
32
- } catch(e) {
33
- console.log('runtime_remote1 container already initialized')
34
- }
35
- }
36
- }
37
- resolve(proxy)
38
- }
39
- document.head.appendChild(script);
40
-
41
- })` ,
20
+ remote1 : 'runtime_remote1@http://127.0.0.1:3006/mf-manifest.json' ,
21
+ // remote1: `promise new Promise((resolve)=>{
22
+ // const raw = 'runtime_remote1@http://127.0.0.1:3006/remoteEntry.js'
23
+ // const [_, remoteUrlWithVersion] = raw.split('@')
24
+ // const script = document.createElement('script')
25
+ // script.src = remoteUrlWithVersion
26
+ // script.onload = () => {
27
+ // const proxy = {
28
+ // get: (request) => window.runtime_remote1.get(request),
29
+ // init: (arg) => {
30
+ // try {
31
+ // return window.runtime_remote1.init(arg)
32
+ // } catch(e) {
33
+ // console.log('runtime_remote1 container already initialized')
34
+ // }
35
+ // }
36
+ // }
37
+ // resolve(proxy)
38
+ // }
39
+ // document.head.appendChild(script);
40
+ //
41
+ // })`,
42
42
} ,
43
43
// library: { type: 'var', name: 'runtime_remote' },
44
44
filename : 'remoteEntry.js' ,
0 commit comments