Skip to content

Commit 52433fe

Browse files
chore: align react version in runtime demo (#2763)
Co-authored-by: ScriptedAlchemy <[email protected]>
1 parent 624ad4b commit 52433fe

File tree

2 files changed

+174
-159
lines changed

2 files changed

+174
-159
lines changed

apps/runtime-demo/3005-runtime-host/webpack.config.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ module.exports = composePlugins(withNx(), withReact(), (config, context) => {
1717
name: 'runtime_host',
1818
remotes: {
1919
// 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+
// })`,
4242
},
4343
// library: { type: 'var', name: 'runtime_remote' },
4444
filename: 'remoteEntry.js',

0 commit comments

Comments
 (0)