├── .gitignore ├── main ├── .browserslistrc ├── vue.config.js ├── public │ ├── favicon.ico │ └── index.html ├── .gitignore ├── package.json ├── README.md └── src │ ├── App.vue │ └── main.js ├── vue ├── .browserslistrc ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── assets │ │ └── logo.png │ ├── views │ │ ├── About.vue │ │ └── Home.vue │ ├── store │ │ └── index.js │ ├── router │ │ └── index.js │ ├── App.vue │ ├── main.js │ └── components │ │ └── HelloWorld.vue ├── .gitignore ├── package.json ├── vue.config.js └── README.md ├── react-static ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── static │ ├── css │ │ ├── main.c9be9530.chunk.css │ │ └── main.c9be9530.chunk.css.map │ └── js │ │ ├── 3.1c005ed2.chunk.js │ │ ├── 3.1c005ed2.chunk.js.map │ │ ├── 2.7c17e302.chunk.js.LICENSE.txt │ │ ├── runtime-main.728d58d7.js │ │ ├── main.c77f4dd5.chunk.js │ │ ├── main.c77f4dd5.chunk.js.map │ │ └── runtime-main.728d58d7.js.map ├── manifest.json ├── precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js ├── service-worker.js ├── asset-manifest.json └── index.html ├── react ├── build │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── static │ │ ├── css │ │ │ ├── main.c9be9530.chunk.css │ │ │ └── main.c9be9530.chunk.css.map │ │ └── js │ │ │ ├── 3.1c005ed2.chunk.js │ │ │ ├── 3.1c005ed2.chunk.js.map │ │ │ ├── 2.7c17e302.chunk.js.LICENSE.txt │ │ │ ├── runtime-main.728d58d7.js │ │ │ ├── main.c77f4dd5.chunk.js │ │ │ ├── main.c77f4dd5.chunk.js.map │ │ │ └── runtime-main.728d58d7.js.map │ ├── manifest.json │ ├── precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js │ ├── service-worker.js │ ├── asset-manifest.json │ └── index.html ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── index.html ├── .env ├── src │ ├── pages │ │ ├── About.js │ │ └── Home.js │ ├── App.test.js │ ├── App.css │ ├── components │ │ ├── LibVersion.js │ │ └── HelloModal.js │ ├── App.js │ ├── index.js │ ├── serviceWorker.js │ └── logo.svg ├── .rescriptsrc.js ├── package.json └── README.md ├── main-static ├── favicon.ico ├── css │ └── app.af608708.css ├── index.html └── js │ ├── app.1a025158.js │ └── app.1a025158.js.map ├── vue-static ├── favicon.ico ├── img │ └── logo.82b9c7a5.png ├── css │ └── app.74f9f059.css ├── js │ ├── about.b7915347.js │ ├── about.b7915347.js.map │ ├── app.3630cf03.js │ └── app.3630cf03.js.map └── index.html ├── main-server.js ├── vue-server.js ├── react-server.js ├── package.json └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /main/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /vue/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /react-static/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /react/build/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /react/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /main/vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | devServer: { 3 | port: 8000, 4 | } 5 | } -------------------------------------------------------------------------------- /react/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | BROWSER=none 3 | PORT=8002 4 | WDS_SOCKET_PORT=8002 5 | -------------------------------------------------------------------------------- /main-static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/main-static/favicon.ico -------------------------------------------------------------------------------- /main/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/main/public/favicon.ico -------------------------------------------------------------------------------- /react/build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react/build/favicon.ico -------------------------------------------------------------------------------- /react/build/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react/build/logo192.png -------------------------------------------------------------------------------- /react/build/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react/build/logo512.png -------------------------------------------------------------------------------- /vue-static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/vue-static/favicon.ico -------------------------------------------------------------------------------- /vue/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/vue/public/favicon.ico -------------------------------------------------------------------------------- /vue/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/vue/src/assets/logo.png -------------------------------------------------------------------------------- /react-static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react-static/favicon.ico -------------------------------------------------------------------------------- /react-static/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react-static/logo192.png -------------------------------------------------------------------------------- /react-static/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react-static/logo512.png -------------------------------------------------------------------------------- /react/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react/public/favicon.ico -------------------------------------------------------------------------------- /react/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react/public/logo192.png -------------------------------------------------------------------------------- /react/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/react/public/logo512.png -------------------------------------------------------------------------------- /vue-static/img/logo.82b9c7a5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woai3c/micro-frontend-demo/HEAD/vue-static/img/logo.82b9c7a5.png -------------------------------------------------------------------------------- /vue/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /react/src/pages/About.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function() { 4 | return ( 5 |

6 | About 7 |

8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /react/src/pages/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function() { 4 | return ( 5 |

6 | Home 7 |

8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /vue/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | Vue.use(Vuex) 5 | 6 | export default new Vuex.Store({ 7 | state: { 8 | }, 9 | mutations: { 10 | }, 11 | actions: { 12 | }, 13 | modules: { 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /react/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /react-static/static/css/main.c9be9530.chunk.css: -------------------------------------------------------------------------------- 1 | .app-main{display:flex;flex-direction:column;align-items:center}.app-title{font-size:30px;margin:0 0 32px}.app-lib{font-size:16px;color:#2c3e50}.app-nav-item{margin-top:16px;padding:12px 24px;border:2px solid #2c3e50} 2 | /*# sourceMappingURL=main.c9be9530.chunk.css.map */ -------------------------------------------------------------------------------- /react/build/static/css/main.c9be9530.chunk.css: -------------------------------------------------------------------------------- 1 | .app-main{display:flex;flex-direction:column;align-items:center}.app-title{font-size:30px;margin:0 0 32px}.app-lib{font-size:16px;color:#2c3e50}.app-nav-item{margin-top:16px;padding:12px 24px;border:2px solid #2c3e50} 2 | /*# sourceMappingURL=main.c9be9530.chunk.css.map */ -------------------------------------------------------------------------------- /react-static/static/js/3.1c005ed2.chunk.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp_react=window.webpackJsonp_react||[]).push([[3],{166:function(e,n,t){"use strict";t.r(n);var a=t(0),r=t.n(a);n.default=function(){return r.a.createElement("h2",{className:"app-nav-item",style:{borderColor:"green"}},"About")}}}]); 2 | //# sourceMappingURL=3.1c005ed2.chunk.js.map -------------------------------------------------------------------------------- /react/build/static/js/3.1c005ed2.chunk.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp_react=window.webpackJsonp_react||[]).push([[3],{166:function(e,n,t){"use strict";t.r(n);var a=t(0),r=t.n(a);n.default=function(){return r.a.createElement("h2",{className:"app-nav-item",style:{borderColor:"green"}},"About")}}}]); 2 | //# sourceMappingURL=3.1c005ed2.chunk.js.map -------------------------------------------------------------------------------- /main/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /vue/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /react/src/App.css: -------------------------------------------------------------------------------- 1 | .app-main { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | } 6 | 7 | .app-title { 8 | font-size: 30px; 9 | margin: 0; 10 | margin-bottom: 32px; 11 | } 12 | 13 | .app-lib { 14 | font-size: 16px; 15 | color: #2c3e50; 16 | } 17 | 18 | .app-nav-item { 19 | margin-top: 16px; 20 | padding: 12px 24px; 21 | border: 2px solid #2c3e50; 22 | } 23 | -------------------------------------------------------------------------------- /react/src/components/LibVersion.js: -------------------------------------------------------------------------------- 1 | import React, { version as reactVersion } from 'react'; 2 | import { version as antdVersion } from 'antd'; 3 | 4 | export default function() { 5 | return ( 6 | <> 7 |

React Demo

8 |

9 | React version: {reactVersion}, AntD version: {antdVersion} 10 |

11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /vue/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "micro-frontend-demo", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "qiankun": "^2.3.2", 11 | "vue": "^2.6.11" 12 | }, 13 | "devDependencies": { 14 | "@vue/cli-service": "^4.5.0", 15 | "vue-template-compiler": "^2.6.11" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /main-server.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const express = require('express') 3 | const app = express() 4 | const port = 8000 5 | 6 | app.use(express.static('main-static')) 7 | 8 | app.get('*', (req, res) => { 9 | fs.readFile('./main-static/index.html', 'utf-8', (err, html) => { 10 | res.send(html) 11 | }) 12 | }) 13 | 14 | app.listen(port, () => { 15 | console.log(`main app listening at http://localhost:${port}`) 16 | }) -------------------------------------------------------------------------------- /react/build/static/js/3.1c005ed2.chunk.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["pages/About.js"],"names":["className","style","borderColor"],"mappings":"sGAAA,2BAEe,qBACb,OACE,wBAAIA,UAAU,eAAeC,MAAO,CAAEC,YAAa,UAAnD","file":"static/js/3.1c005ed2.chunk.js","sourcesContent":["import React from 'react';\n\nexport default function() {\n return (\n

\n About\n

\n );\n}\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "vue": "^2.6.11", 11 | "vue-router": "^3.2.0", 12 | "vuex": "^3.4.0" 13 | }, 14 | "devDependencies": { 15 | "@vue/cli-service": "^4.5.0", 16 | "vue-template-compiler": "^2.6.11" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /react-static/static/js/3.1c005ed2.chunk.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["pages/About.js"],"names":["className","style","borderColor"],"mappings":"sGAAA,2BAEe,qBACb,OACE,wBAAIA,UAAU,eAAeC,MAAO,CAAEC,YAAa,UAAnD","file":"static/js/3.1c005ed2.chunk.js","sourcesContent":["import React from 'react';\n\nexport default function() {\n return (\n

\n About\n

\n );\n}\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /vue-static/css/app.74f9f059.css: -------------------------------------------------------------------------------- 1 | #app{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50}#nav{padding:30px}#nav a{font-weight:700;color:#2c3e50}#nav a.router-link-exact-active{color:#42b983}h3[data-v-574af232]{margin:40px 0 0}ul[data-v-574af232]{list-style-type:none;padding:0}li[data-v-574af232]{display:inline-block;margin:0 10px}a[data-v-574af232]{color:#42b983} -------------------------------------------------------------------------------- /vue-static/js/about.b7915347.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp_vue"]=window["webpackJsonp_vue"]||[]).push([["about"],{f820:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},u=[function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"about"},[n("h1",[e._v("This is an about page")])])}],s=n("2877"),c={},i=Object(s["a"])(c,a,u,!1,null,null,null);t["default"]=i.exports}}]); 2 | //# sourceMappingURL=about.b7915347.js.map -------------------------------------------------------------------------------- /vue/vue.config.js: -------------------------------------------------------------------------------- 1 | const { name } = require('./package.json') 2 | 3 | module.exports = { 4 | configureWebpack: { 5 | output: { 6 | // 把子应用打包成 umd 库格式 7 | library: `${name}-[name]`, 8 | libraryTarget: 'umd', 9 | jsonpFunction: `webpackJsonp_${name}` 10 | } 11 | }, 12 | devServer: { 13 | port: 8001, 14 | headers: { 15 | 'Access-Control-Allow-Origin': '*' 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /vue-server.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const express = require('express') 3 | const app = express() 4 | const cors = require('cors') 5 | const port = 8001 6 | 7 | // 设置跨域 8 | app.use(cors()) 9 | app.use(express.static('vue-static')) 10 | 11 | app.get('*', (req, res) => { 12 | fs.readFile('./vue-static/index.html', 'utf-8', (err, html) => { 13 | res.send(html) 14 | }) 15 | }) 16 | 17 | app.listen(port, () => { 18 | console.log(`vue app listening at http://localhost:${port}`) 19 | }) -------------------------------------------------------------------------------- /main/README.md: -------------------------------------------------------------------------------- 1 | # micro-frontend-demo 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Run your tests 19 | ``` 20 | npm run test 21 | ``` 22 | 23 | ### Lints and fixes files 24 | ``` 25 | npm run lint 26 | ``` 27 | 28 | ### Customize configuration 29 | See [Configuration Reference](https://cli.vuejs.org/config/). 30 | -------------------------------------------------------------------------------- /react-server.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const express = require('express') 3 | const app = express() 4 | const cors = require('cors') 5 | const port = 8002 6 | 7 | // 设置跨域 8 | app.use(cors()) 9 | app.use(express.static('react-static')) 10 | 11 | app.get('*', (req, res) => { 12 | fs.readFile('./react-static/index.html', 'utf-8', (err, html) => { 13 | res.send(html) 14 | }) 15 | }) 16 | 17 | app.listen(port, () => { 18 | console.log(`react app listening at http://localhost:${port}`) 19 | }) -------------------------------------------------------------------------------- /vue/README.md: -------------------------------------------------------------------------------- 1 | # micro-frontend-demo2 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Run your tests 19 | ``` 20 | npm run test 21 | ``` 22 | 23 | ### Lints and fixes files 24 | ``` 25 | npm run lint 26 | ``` 27 | 28 | ### Customize configuration 29 | See [Configuration Reference](https://cli.vuejs.org/config/). 30 | -------------------------------------------------------------------------------- /react/src/components/HelloModal.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { Button, Modal } from 'antd'; 3 | 4 | export default function() { 5 | const [visible, setVisible] = useState(false); 6 | return ( 7 | <> 8 | 9 | setVisible(false)} onCancel={() => setVisible(false)} title="qiankun"> 10 | Probably the most complete micro-frontends solution you ever met 11 | 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /react/build/static/css/main.c9be9530.chunk.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["App.css"],"names":[],"mappings":"AAAA,UACE,YAAa,CACb,qBAAsB,CACtB,kBACF,CAEA,WACE,cAAe,CAEf,eACF,CAEA,SACE,cAAe,CACf,aACF,CAEA,cACE,eAAgB,CAChB,iBAAkB,CAClB,wBACF","file":"main.c9be9530.chunk.css","sourcesContent":[".app-main {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.app-title {\n font-size: 30px;\n margin: 0;\n margin-bottom: 32px;\n}\n\n.app-lib {\n font-size: 16px;\n color: #2c3e50;\n}\n\n.app-nav-item {\n margin-top: 16px;\n padding: 12px 24px;\n border: 2px solid #2c3e50;\n}\n"]} -------------------------------------------------------------------------------- /react-static/static/css/main.c9be9530.chunk.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["App.css"],"names":[],"mappings":"AAAA,UACE,YAAa,CACb,qBAAsB,CACtB,kBACF,CAEA,WACE,cAAe,CAEf,eACF,CAEA,SACE,cAAe,CACf,aACF,CAEA,cACE,eAAgB,CAChB,iBAAkB,CAClB,wBACF","file":"main.c9be9530.chunk.css","sourcesContent":[".app-main {\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n\n.app-title {\n font-size: 30px;\n margin: 0;\n margin-bottom: 32px;\n}\n\n.app-lib {\n font-size: 16px;\n color: #2c3e50;\n}\n\n.app-nav-item {\n margin-top: 16px;\n padding: 12px 24px;\n border: 2px solid #2c3e50;\n}\n"]} -------------------------------------------------------------------------------- /react/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react-static/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /vue/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import Home from '../views/Home.vue' 4 | 5 | Vue.use(VueRouter) 6 | 7 | const routes = [ 8 | { 9 | path: '/', 10 | name: 'Home', 11 | component: Home 12 | }, 13 | { 14 | path: '/about', 15 | name: 'About', 16 | // route level code-splitting 17 | // this generates a separate chunk (about.[hash].js) for this route 18 | // which is lazy-loaded when the route is visited. 19 | component: function () { 20 | return import(/* webpackChunkName: "about" */ '../views/About.vue') 21 | } 22 | } 23 | ] 24 | 25 | export default routes 26 | -------------------------------------------------------------------------------- /vue/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 33 | -------------------------------------------------------------------------------- /main/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /vue/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /react/.rescriptsrc.js: -------------------------------------------------------------------------------- 1 | const { name } = require('./package'); 2 | 3 | module.exports = { 4 | webpack: config => { 5 | config.output.library = `${name}-[name]`; 6 | config.output.libraryTarget = 'umd'; 7 | config.output.jsonpFunction = `webpackJsonp_${name}`; 8 | config.output.globalObject = 'window'; 9 | 10 | return config; 11 | }, 12 | 13 | devServer: _ => { 14 | const config = _; 15 | 16 | config.headers = { 17 | 'Access-Control-Allow-Origin': '*', 18 | }; 19 | config.historyApiFallback = true; 20 | 21 | config.hot = false; 22 | config.watchContentBase = false; 23 | config.liveReload = false; 24 | 25 | return config; 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /main-static/css/app.af608708.css: -------------------------------------------------------------------------------- 1 | body{margin:0}.mainapp{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;line-height:1}.mainapp-header h1{color:#333;font-size:36px;font-weight:700;margin:0;padding:36px}.mainapp-main{display:flex}.mainapp-sidemenu{width:130px;list-style:none;margin:0;margin-left:40px;padding:0;border-right:2px solid #aaa}.mainapp-sidemenu li{color:#aaa;margin:20px 0;font-size:18px;font-weight:400;cursor:pointer}.mainapp-sidemenu li:hover{color:#444}.mainapp-sidemenu li:first-child{margin-top:5px}.subapp-container{flex-grow:1;position:relative;margin:0 40px}.subapp-loading{color:#444;font-size:28px;font-weight:600;text-align:center} -------------------------------------------------------------------------------- /main-static/index.html: -------------------------------------------------------------------------------- 1 | micro-frontend-demo
-------------------------------------------------------------------------------- /react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react", 3 | "version": "0.1.0", 4 | "dependencies": { 5 | "antd": "^3.25.2", 6 | "react": "^16.12.0", 7 | "react-dom": "^16.12.0", 8 | "react-router-dom": "^5.1.2" 9 | }, 10 | "scripts": { 11 | "dev": "rescripts start", 12 | "build": "rescripts build", 13 | "test": "rescripts test", 14 | "eject": "rescripts eject" 15 | }, 16 | "browserslist": { 17 | "production": [ 18 | ">0.2%", 19 | "not dead", 20 | "not op_mini all" 21 | ], 22 | "development": [ 23 | "last 1 chrome version", 24 | "last 1 firefox version", 25 | "last 1 safari version" 26 | ] 27 | }, 28 | "devDependencies": { 29 | "@rescripts/cli": "^0.0.14", 30 | "react-scripts": "^3.4.1" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vue-static/index.html: -------------------------------------------------------------------------------- 1 | vue
-------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "micro-frontend-demo", 3 | "version": "1.0.0", 4 | "description": "本 DEMO 使用的是微前端框架 [qiankun](https://qiankun.umijs.org/zh/guide)。包含了三个应用:\r * main:主应用,使用 vue-cli 创建。\r * vue:子应用,使用 vue-cli 创建。\r * react: 子应用,使用的 react 16 版本。", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "repository": { 9 | "type": "git", 10 | "url": "git+https://github.com/woai3c/micro-frontend-demo.git" 11 | }, 12 | "keywords": [], 13 | "author": "", 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/woai3c/micro-frontend-demo/issues" 17 | }, 18 | "homepage": "https://github.com/woai3c/micro-frontend-demo#readme", 19 | "dependencies": { 20 | "cors": "^2.8.5", 21 | "express": "^4.17.1" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 微前端 DEMO 2 | 本 DEMO 使用的是微前端框架 [qiankun](https://qiankun.umijs.org/zh/guide)。包含了三个应用: 3 | * main:主应用,使用 vue-cli 创建。 4 | * vue:子应用,使用 vue-cli 创建。 5 | * react: 子应用,使用的 react 16 版本。 6 | 7 | 主应用其实就是一个底座,没什么功能,只有跳转到子应用的功能。 8 | ## 安装 9 | 在三个目录下分别执行 10 | ``` 11 | npm i 12 | ``` 13 | ## 开发 14 | 在三个目录下分别执行 15 | ``` 16 | npm run dev 17 | ``` 18 | 然后打开网页,访问主应用 `http://localhost:8000/`。 19 | 20 | 子应用也可单独访问: 21 | * Vue 子应用:`http://localhost:8001/` 22 | * React 子应用:`http://localhost:8002/` 23 | ## 部署 24 | 将三个应用打包后的文件复制到 `main-static`、`vue-static`、`react-static` 目录,然后运行三条命令: 25 | * `node main-server.js` 26 | * `node vue-server.js` 27 | * `node react-server.js` 28 | 29 | 即可开始访问页面。 30 | 31 | 访问主应用 `http://localhost:8000/`。 32 | 33 | 访问子应用: 34 | * Vue 子应用:`http://localhost:8001/` 35 | * React 子应用:`http://localhost:8002/` 36 | -------------------------------------------------------------------------------- /react-static/precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = (self.__precacheManifest || []).concat([ 2 | { 3 | "revision": "d0d80fd87df4cb41460ff4e94ef0cd27", 4 | "url": "/index.html" 5 | }, 6 | { 7 | "revision": "ff46c74c46606ea7b565", 8 | "url": "/static/css/2.7bfd32cb.chunk.css" 9 | }, 10 | { 11 | "revision": "3ef5314a8f214633069b", 12 | "url": "/static/css/main.c9be9530.chunk.css" 13 | }, 14 | { 15 | "revision": "ff46c74c46606ea7b565", 16 | "url": "/static/js/2.7c17e302.chunk.js" 17 | }, 18 | { 19 | "revision": "29eb69a08ea4198f7b46e1db8a3d5045", 20 | "url": "/static/js/2.7c17e302.chunk.js.LICENSE.txt" 21 | }, 22 | { 23 | "revision": "3500d5cca5eba0eaa58d", 24 | "url": "/static/js/3.1c005ed2.chunk.js" 25 | }, 26 | { 27 | "revision": "3ef5314a8f214633069b", 28 | "url": "/static/js/main.c77f4dd5.chunk.js" 29 | }, 30 | { 31 | "revision": "826e86988f8e069d6dc9", 32 | "url": "/static/js/runtime-main.728d58d7.js" 33 | } 34 | ]); -------------------------------------------------------------------------------- /react/build/precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = (self.__precacheManifest || []).concat([ 2 | { 3 | "revision": "d0d80fd87df4cb41460ff4e94ef0cd27", 4 | "url": "/index.html" 5 | }, 6 | { 7 | "revision": "ff46c74c46606ea7b565", 8 | "url": "/static/css/2.7bfd32cb.chunk.css" 9 | }, 10 | { 11 | "revision": "3ef5314a8f214633069b", 12 | "url": "/static/css/main.c9be9530.chunk.css" 13 | }, 14 | { 15 | "revision": "ff46c74c46606ea7b565", 16 | "url": "/static/js/2.7c17e302.chunk.js" 17 | }, 18 | { 19 | "revision": "29eb69a08ea4198f7b46e1db8a3d5045", 20 | "url": "/static/js/2.7c17e302.chunk.js.LICENSE.txt" 21 | }, 22 | { 23 | "revision": "3500d5cca5eba0eaa58d", 24 | "url": "/static/js/3.1c005ed2.chunk.js" 25 | }, 26 | { 27 | "revision": "3ef5314a8f214633069b", 28 | "url": "/static/js/main.c77f4dd5.chunk.js" 29 | }, 30 | { 31 | "revision": "826e86988f8e069d6dc9", 32 | "url": "/static/js/runtime-main.728d58d7.js" 33 | } 34 | ]); -------------------------------------------------------------------------------- /react/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { lazy, Suspense } from 'react'; 2 | import { BrowserRouter as Router, Link, Route, Switch } from 'react-router-dom'; 3 | import { Divider } from 'antd'; 4 | 5 | import 'antd/dist/antd.min.css'; 6 | import './App.css'; 7 | 8 | import LibVersion from './components/LibVersion'; 9 | import HelloModal from './components/HelloModal'; 10 | 11 | import Home from './pages/Home'; 12 | const About = lazy(() => import('./pages/About')); 13 | 14 | const RouteExample = () => { 15 | return ( 16 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ); 30 | }; 31 | 32 | export default function App() { 33 | return ( 34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /react-static/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js" 18 | ); 19 | 20 | self.addEventListener('message', (event) => { 21 | if (event.data && event.data.type === 'SKIP_WAITING') { 22 | self.skipWaiting(); 23 | } 24 | }); 25 | 26 | workbox.core.clientsClaim(); 27 | 28 | /** 29 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 30 | * requests for URLs in the manifest. 31 | * See https://goo.gl/S9QRab 32 | */ 33 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 34 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 35 | 36 | workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), { 37 | 38 | blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/], 39 | }); 40 | -------------------------------------------------------------------------------- /react/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js" 18 | ); 19 | 20 | self.addEventListener('message', (event) => { 21 | if (event.data && event.data.type === 'SKIP_WAITING') { 22 | self.skipWaiting(); 23 | } 24 | }); 25 | 26 | workbox.core.clientsClaim(); 27 | 28 | /** 29 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 30 | * requests for URLs in the manifest. 31 | * See https://goo.gl/S9QRab 32 | */ 33 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 34 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 35 | 36 | workbox.routing.registerNavigationRoute(workbox.precaching.getCacheKeyForURL("/index.html"), { 37 | 38 | blacklist: [/^\/_/,/\/[^/?]+\.[^/]+$/], 39 | }); 40 | -------------------------------------------------------------------------------- /vue-static/js/about.b7915347.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack://vue-[name]/./src/views/About.vue?35f1","webpack://vue-[name]/./src/views/About.vue"],"names":["render","_vm","this","_h","$createElement","_self","_c","_m","staticRenderFns","staticClass","_v","script","component"],"mappings":"sHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAsBH,EAAII,MAAMC,GAAO,OAAOL,EAAIM,GAAG,IACnGC,EAAkB,CAAC,WAAa,IAAIP,EAAIC,KAASC,EAAGF,EAAIG,eAAmBE,EAAGL,EAAII,MAAMC,IAAIH,EAAG,OAAOG,EAAG,MAAM,CAACG,YAAY,SAAS,CAACH,EAAG,KAAK,CAACL,EAAIS,GAAG,+B,YCAtJC,EAAS,GAKTC,EAAY,eACdD,EACAX,EACAQ,GACA,EACA,KACA,KACA,MAIa,aAAAI,E","file":"js/about.b7915347.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"about\"},[_c('h1',[_vm._v(\"This is an about page\")])])}]\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./About.vue?vue&type=template&id=1ae8a7be&\"\nvar script = {}\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} -------------------------------------------------------------------------------- /react-static/static/js/2.7c17e302.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | object-assign 3 | (c) Sindre Sorhus 4 | @license MIT 5 | */ 6 | 7 | /*! 8 | Copyright (c) 2017 Jed Watson. 9 | Licensed under the MIT License (MIT), see 10 | http://jedwatson.github.io/classnames 11 | */ 12 | 13 | /** @license React v0.19.1 14 | * scheduler.production.min.js 15 | * 16 | * Copyright (c) Facebook, Inc. and its affiliates. 17 | * 18 | * This source code is licensed under the MIT license found in the 19 | * LICENSE file in the root directory of this source tree. 20 | */ 21 | 22 | /** @license React v16.13.1 23 | * react-is.production.min.js 24 | * 25 | * Copyright (c) Facebook, Inc. and its affiliates. 26 | * 27 | * This source code is licensed under the MIT license found in the 28 | * LICENSE file in the root directory of this source tree. 29 | */ 30 | 31 | /** @license React v16.14.0 32 | * react-dom.production.min.js 33 | * 34 | * Copyright (c) Facebook, Inc. and its affiliates. 35 | * 36 | * This source code is licensed under the MIT license found in the 37 | * LICENSE file in the root directory of this source tree. 38 | */ 39 | 40 | /** @license React v16.14.0 41 | * react.production.min.js 42 | * 43 | * Copyright (c) Facebook, Inc. and its affiliates. 44 | * 45 | * This source code is licensed under the MIT license found in the 46 | * LICENSE file in the root directory of this source tree. 47 | */ 48 | -------------------------------------------------------------------------------- /react/build/static/js/2.7c17e302.chunk.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | object-assign 3 | (c) Sindre Sorhus 4 | @license MIT 5 | */ 6 | 7 | /*! 8 | Copyright (c) 2017 Jed Watson. 9 | Licensed under the MIT License (MIT), see 10 | http://jedwatson.github.io/classnames 11 | */ 12 | 13 | /** @license React v0.19.1 14 | * scheduler.production.min.js 15 | * 16 | * Copyright (c) Facebook, Inc. and its affiliates. 17 | * 18 | * This source code is licensed under the MIT license found in the 19 | * LICENSE file in the root directory of this source tree. 20 | */ 21 | 22 | /** @license React v16.13.1 23 | * react-is.production.min.js 24 | * 25 | * Copyright (c) Facebook, Inc. and its affiliates. 26 | * 27 | * This source code is licensed under the MIT license found in the 28 | * LICENSE file in the root directory of this source tree. 29 | */ 30 | 31 | /** @license React v16.14.0 32 | * react-dom.production.min.js 33 | * 34 | * Copyright (c) Facebook, Inc. and its affiliates. 35 | * 36 | * This source code is licensed under the MIT license found in the 37 | * LICENSE file in the root directory of this source tree. 38 | */ 39 | 40 | /** @license React v16.14.0 41 | * react.production.min.js 42 | * 43 | * Copyright (c) Facebook, Inc. and its affiliates. 44 | * 45 | * This source code is licensed under the MIT license found in the 46 | * LICENSE file in the root directory of this source tree. 47 | */ 48 | -------------------------------------------------------------------------------- /react-static/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "main.css": "/static/css/main.c9be9530.chunk.css", 4 | "main.js": "/static/js/main.c77f4dd5.chunk.js", 5 | "main.js.map": "/static/js/main.c77f4dd5.chunk.js.map", 6 | "runtime-main.js": "/static/js/runtime-main.728d58d7.js", 7 | "runtime-main.js.map": "/static/js/runtime-main.728d58d7.js.map", 8 | "static/css/2.7bfd32cb.chunk.css": "/static/css/2.7bfd32cb.chunk.css", 9 | "static/js/2.7c17e302.chunk.js": "/static/js/2.7c17e302.chunk.js", 10 | "static/js/2.7c17e302.chunk.js.map": "/static/js/2.7c17e302.chunk.js.map", 11 | "static/js/3.1c005ed2.chunk.js": "/static/js/3.1c005ed2.chunk.js", 12 | "static/js/3.1c005ed2.chunk.js.map": "/static/js/3.1c005ed2.chunk.js.map", 13 | "index.html": "/index.html", 14 | "precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js": "/precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js", 15 | "service-worker.js": "/service-worker.js", 16 | "static/css/2.7bfd32cb.chunk.css.map": "/static/css/2.7bfd32cb.chunk.css.map", 17 | "static/css/main.c9be9530.chunk.css.map": "/static/css/main.c9be9530.chunk.css.map", 18 | "static/js/2.7c17e302.chunk.js.LICENSE.txt": "/static/js/2.7c17e302.chunk.js.LICENSE.txt" 19 | }, 20 | "entrypoints": [ 21 | "static/js/runtime-main.728d58d7.js", 22 | "static/css/2.7bfd32cb.chunk.css", 23 | "static/js/2.7c17e302.chunk.js", 24 | "static/css/main.c9be9530.chunk.css", 25 | "static/js/main.c77f4dd5.chunk.js" 26 | ] 27 | } -------------------------------------------------------------------------------- /react/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "main.css": "/static/css/main.c9be9530.chunk.css", 4 | "main.js": "/static/js/main.c77f4dd5.chunk.js", 5 | "main.js.map": "/static/js/main.c77f4dd5.chunk.js.map", 6 | "runtime-main.js": "/static/js/runtime-main.728d58d7.js", 7 | "runtime-main.js.map": "/static/js/runtime-main.728d58d7.js.map", 8 | "static/css/2.7bfd32cb.chunk.css": "/static/css/2.7bfd32cb.chunk.css", 9 | "static/js/2.7c17e302.chunk.js": "/static/js/2.7c17e302.chunk.js", 10 | "static/js/2.7c17e302.chunk.js.map": "/static/js/2.7c17e302.chunk.js.map", 11 | "static/js/3.1c005ed2.chunk.js": "/static/js/3.1c005ed2.chunk.js", 12 | "static/js/3.1c005ed2.chunk.js.map": "/static/js/3.1c005ed2.chunk.js.map", 13 | "index.html": "/index.html", 14 | "precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js": "/precache-manifest.030c361f0fa31a7e1771a206054a6ebd.js", 15 | "service-worker.js": "/service-worker.js", 16 | "static/css/2.7bfd32cb.chunk.css.map": "/static/css/2.7bfd32cb.chunk.css.map", 17 | "static/css/main.c9be9530.chunk.css.map": "/static/css/main.c9be9530.chunk.css.map", 18 | "static/js/2.7c17e302.chunk.js.LICENSE.txt": "/static/js/2.7c17e302.chunk.js.LICENSE.txt" 19 | }, 20 | "entrypoints": [ 21 | "static/js/runtime-main.728d58d7.js", 22 | "static/css/2.7bfd32cb.chunk.css", 23 | "static/js/2.7c17e302.chunk.js", 24 | "static/css/main.c9be9530.chunk.css", 25 | "static/js/main.c77f4dd5.chunk.js" 26 | ] 27 | } -------------------------------------------------------------------------------- /react/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | import * as serviceWorker from './serviceWorker'; 5 | 6 | function render(props) { 7 | const { container } = props; 8 | ReactDOM.render(, container ? container.querySelector('#root') : document.querySelector('#root')); 9 | } 10 | 11 | function storeTest(props) { 12 | props.onGlobalStateChange((value, prev) => console.log(`[onGlobalStateChange - ${props.name}]:`, value, prev), true); 13 | props.setGlobalState({ 14 | ignore: props.name, 15 | user: { 16 | name: props.name, 17 | }, 18 | }); 19 | } 20 | 21 | if (window.__POWERED_BY_QIANKUN__) { 22 | // eslint-disable-next-line no-undef 23 | __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__; 24 | } else { 25 | render({}); 26 | } 27 | 28 | export async function bootstrap() { 29 | console.log('[react16] react app bootstraped'); 30 | } 31 | 32 | export async function mount(props) { 33 | console.log('[react16] props from main framework', props); 34 | storeTest(props); 35 | render(props); 36 | } 37 | 38 | export async function unmount(props) { 39 | const { container } = props; 40 | ReactDOM.unmountComponentAtNode(container ? container.querySelector('#root') : document.querySelector('#root')); 41 | } 42 | 43 | // If you want your app to work offline and load faster, you can change 44 | // unregister() to register() below. Note this comes with some pitfalls. 45 | // Learn more about service workers: https://bit.ly/CRA-PWA 46 | serviceWorker.unregister(); 47 | -------------------------------------------------------------------------------- /react/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /vue/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import App from './App.vue' 4 | import routes from './router' 5 | import store from './store' 6 | 7 | Vue.config.productionTip = false 8 | 9 | let router = null 10 | let instance = null 11 | 12 | function render(props = {}) { 13 | const { container } = props 14 | router = new VueRouter({ 15 | // hash 模式不需要下面两行 16 | base: window.__POWERED_BY_QIANKUN__ ? '/vue' : '/', 17 | mode: 'history', 18 | routes, 19 | }) 20 | 21 | instance = new Vue({ 22 | router, 23 | store, 24 | render: h => h(App), 25 | }).$mount(container ? container.querySelector('#app') : '#app') 26 | } 27 | 28 | if (window.__POWERED_BY_QIANKUN__) { 29 | // eslint-disable-next-line no-undef 30 | __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__; 31 | } else { 32 | render() 33 | } 34 | 35 | function storeTest(props) { 36 | props.onGlobalStateChange && 37 | props.onGlobalStateChange( 38 | (value, prev) => console.log(`[onGlobalStateChange - ${props.name}]:`, value, prev), 39 | true, 40 | ) 41 | props.setGlobalState && 42 | props.setGlobalState({ 43 | ignore: props.name, 44 | user: { 45 | name: props.name, 46 | }, 47 | }) 48 | } 49 | 50 | export async function bootstrap() { 51 | console.log('[vue] vue app bootstraped') 52 | } 53 | 54 | export async function mount(props) { 55 | console.log('[vue] props from main framework', props) 56 | storeTest(props) 57 | render(props) 58 | } 59 | 60 | export async function unmount() { 61 | instance.$destroy() 62 | instance.$el.innerHTML = '' 63 | instance = null 64 | router = null 65 | } 66 | -------------------------------------------------------------------------------- /vue/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 39 | 40 | 41 | 57 | -------------------------------------------------------------------------------- /main/src/App.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 33 | 34 | 94 | -------------------------------------------------------------------------------- /react/build/static/js/runtime-main.728d58d7.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,a,i=r[0],c=r[1],l=r[2],p=0,s=[];p render({ loading }) 35 | 36 | /** 37 | * Step2 注册子应用 38 | */ 39 | 40 | registerMicroApps( 41 | [ 42 | { 43 | name: 'vue', // 子应用名称 44 | entry: '//localhost:8001', // 子应用入口地址 45 | container: '#subapp-viewport', 46 | loader, 47 | activeRule: '/vue', // 子应用触发路由 48 | }, 49 | { 50 | name: 'react', 51 | entry: '//localhost:8002', 52 | container: '#subapp-viewport', 53 | loader, 54 | activeRule: '/react', 55 | }, 56 | ], 57 | // 子应用生命周期事件 58 | { 59 | beforeLoad: [ 60 | app => { 61 | console.log('[LifeCycle] before load %c%s', 'color: green', app.name) 62 | }, 63 | ], 64 | beforeMount: [ 65 | app => { 66 | console.log('[LifeCycle] before mount %c%s', 'color: green', app.name) 67 | }, 68 | ], 69 | afterUnmount: [ 70 | app => { 71 | console.log('[LifeCycle] after unmount %c%s', 'color: green', app.name) 72 | }, 73 | ], 74 | }, 75 | ) 76 | 77 | // 定义全局状态,可以在主应用、子应用中使用 78 | const { onGlobalStateChange, setGlobalState } = initGlobalState({ 79 | user: 'qiankun', 80 | }) 81 | 82 | // 监听全局状态变化 83 | onGlobalStateChange((value, prev) => console.log('[onGlobalStateChange - master]:', value, prev)) 84 | 85 | // 设置全局状态 86 | setGlobalState({ 87 | ignore: 'master', 88 | user: { 89 | name: 'master', 90 | }, 91 | }) 92 | 93 | /** 94 | * Step3 设置默认进入的子应用 95 | */ 96 | setDefaultMountApp('/vue') 97 | 98 | /** 99 | * Step4 启动应用 100 | */ 101 | start() 102 | 103 | runAfterFirstMounted(() => { 104 | console.log('[MainApp] first app mounted') 105 | }) 106 | -------------------------------------------------------------------------------- /react-static/index.html: -------------------------------------------------------------------------------- 1 | React App
-------------------------------------------------------------------------------- /react/build/index.html: -------------------------------------------------------------------------------- 1 | React App
-------------------------------------------------------------------------------- /react/README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 2 | 3 | ## Available Scripts 4 | 5 | In the project directory, you can run: 6 | 7 | ### `yarn start` 8 | 9 | Runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 10 | 11 | The page will reload if you make edits.
You will also see any lint errors in the console. 12 | 13 | ### `yarn test` 14 | 15 | Launches the test runner in the interactive watch mode.
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 16 | 17 | ### `yarn build` 18 | 19 | Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance. 20 | 21 | The build is minified and the filenames include the hashes.
Your app is ready to be deployed! 22 | 23 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 24 | 25 | ### `yarn eject` 26 | 27 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 28 | 29 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 30 | 31 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 32 | 33 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 34 | 35 | ## Learn More 36 | 37 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 38 | 39 | To learn React, check out the [React documentation](https://reactjs.org/). 40 | 41 | ### Code Splitting 42 | 43 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting 44 | 45 | ### Analyzing the Bundle Size 46 | 47 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size 48 | 49 | ### Making a Progressive Web App 50 | 51 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app 52 | 53 | ### Advanced Configuration 54 | 55 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration 56 | 57 | ### Deployment 58 | 59 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment 60 | 61 | ### `yarn build` fails to minify 62 | 63 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify 64 | -------------------------------------------------------------------------------- /main-static/js/app.1a025158.js: -------------------------------------------------------------------------------- 1 | (function(e){function n(n){for(var o,l,i=n[0],c=n[1],u=n[2],p=0,f=[];pv({loading:e});Object(p["b"])([{name:"vue",entry:"//localhost:8001",container:"#subapp-viewport",loader:g,activeRule:"/vue"},{name:"react",entry:"//localhost:8002",container:"#subapp-viewport",loader:g,activeRule:"/react"}],{beforeLoad:[e=>{console.log("[LifeCycle] before load %c%s","color: green",e.name)}],beforeMount:[e=>{console.log("[LifeCycle] before mount %c%s","color: green",e.name)}],afterUnmount:[e=>{console.log("[LifeCycle] after unmount %c%s","color: green",e.name)}]});const{onGlobalStateChange:h,setGlobalState:m}=Object(f["b"])({user:"qiankun"});h((e,n)=>console.log("[onGlobalStateChange - master]:",e,n)),m({ignore:"master",user:{name:"master"}}),Object(d["b"])("/vue"),Object(p["c"])(),Object(d["a"])(()=>{console.log("[MainApp] first app mounted")})},"85ec":function(e,n,t){}}); 2 | //# sourceMappingURL=app.1a025158.js.map -------------------------------------------------------------------------------- /react-static/static/js/main.c77f4dd5.chunk.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["react-main"]=t():e["react-main"]=t()}(window,(function(){return(window.webpackJsonp_react=window.webpackJsonp_react||[]).push([[0],{102:function(e,t,n){e.exports=n(161)},109:function(e,t,n){},161:function(e,t,n){"use strict";n.r(t),n.d(t,"bootstrap",(function(){return C})),n.d(t,"mount",(function(){return x})),n.d(t,"unmount",(function(){return S}));var a=n(25),o=n.n(a),r=n(44),c=n(0),u=n.n(c),l=n(2),i=n.n(l),s=n(46),m=n(4),p=n(164),f=(n(108),n(109),n(163)),d=function(){return u.a.createElement(u.a.Fragment,null,u.a.createElement("h1",{className:"app-title"},"React Demo"),u.a.createElement("p",{className:"app-lib"},"React version: ",c.version,", AntD version: ",f.a))},b=n(99),E=n(35),w=n(165),h=function(){var e=Object(c.useState)(!1),t=Object(b.a)(e,2),n=t[0],a=t[1];return u.a.createElement(u.a.Fragment,null,u.a.createElement(E.a,{onClick:function(){return a(!0)}},"CLICK ME"),u.a.createElement(w.a,{visible:n,onOk:function(){return a(!1)},onCancel:function(){return a(!1)},title:"qiankun"},"Probably the most complete micro-frontends solution you ever met"))},_=function(){return u.a.createElement("h2",{className:"app-nav-item",style:{borderColor:"red"}},"Home")},v=Object(c.lazy)((function(){return n.e(3).then(n.bind(null,166))})),y=function(){return u.a.createElement(s.a,{basename:window.__POWERED_BY_QIANKUN__?"/react":"/"},u.a.createElement("nav",null,u.a.createElement(s.b,{to:"/"},"Home"),u.a.createElement(p.a,{type:"vertical"}),u.a.createElement(s.b,{to:"/about"},"About")),u.a.createElement(c.Suspense,{fallback:null},u.a.createElement(m.c,null,u.a.createElement(m.a,{path:"/",exact:!0,component:_}),u.a.createElement(m.a,{path:"/about",component:v}))))};function k(){return u.a.createElement("div",{className:"app-main"},u.a.createElement(d,null),u.a.createElement(h,null),u.a.createElement(p.a,null),u.a.createElement(y,null))}Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function N(e){var t=e.container;i.a.render(u.a.createElement(k,null),t?t.querySelector("#root"):document.querySelector("#root"))}function g(e){e.onGlobalStateChange((function(t,n){return console.log("[onGlobalStateChange - ".concat(e.name,"]:"),t,n)}),!0),e.setGlobalState({ignore:e.name,user:{name:e.name}})}function C(){return j.apply(this,arguments)}function j(){return(j=Object(r.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("[react16] react app bootstraped");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return O.apply(this,arguments)}function O(){return(O=Object(r.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("[react16] props from main framework",t),g(t),N(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){return A.apply(this,arguments)}function A(){return(A=Object(r.a)(o.a.mark((function e(t){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.container,i.a.unmountComponentAtNode(n?n.querySelector("#root"):document.querySelector("#root"));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.__POWERED_BY_QIANKUN__?n.p=window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__:N({}),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[102,1,2]]])})); 2 | //# sourceMappingURL=main.c77f4dd5.chunk.js.map -------------------------------------------------------------------------------- /react/build/static/js/main.c77f4dd5.chunk.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["react-main"]=t():e["react-main"]=t()}(window,(function(){return(window.webpackJsonp_react=window.webpackJsonp_react||[]).push([[0],{102:function(e,t,n){e.exports=n(161)},109:function(e,t,n){},161:function(e,t,n){"use strict";n.r(t),n.d(t,"bootstrap",(function(){return C})),n.d(t,"mount",(function(){return x})),n.d(t,"unmount",(function(){return S}));var a=n(25),o=n.n(a),r=n(44),c=n(0),u=n.n(c),l=n(2),i=n.n(l),s=n(46),m=n(4),p=n(164),f=(n(108),n(109),n(163)),d=function(){return u.a.createElement(u.a.Fragment,null,u.a.createElement("h1",{className:"app-title"},"React Demo"),u.a.createElement("p",{className:"app-lib"},"React version: ",c.version,", AntD version: ",f.a))},b=n(99),E=n(35),w=n(165),h=function(){var e=Object(c.useState)(!1),t=Object(b.a)(e,2),n=t[0],a=t[1];return u.a.createElement(u.a.Fragment,null,u.a.createElement(E.a,{onClick:function(){return a(!0)}},"CLICK ME"),u.a.createElement(w.a,{visible:n,onOk:function(){return a(!1)},onCancel:function(){return a(!1)},title:"qiankun"},"Probably the most complete micro-frontends solution you ever met"))},_=function(){return u.a.createElement("h2",{className:"app-nav-item",style:{borderColor:"red"}},"Home")},v=Object(c.lazy)((function(){return n.e(3).then(n.bind(null,166))})),y=function(){return u.a.createElement(s.a,{basename:window.__POWERED_BY_QIANKUN__?"/react":"/"},u.a.createElement("nav",null,u.a.createElement(s.b,{to:"/"},"Home"),u.a.createElement(p.a,{type:"vertical"}),u.a.createElement(s.b,{to:"/about"},"About")),u.a.createElement(c.Suspense,{fallback:null},u.a.createElement(m.c,null,u.a.createElement(m.a,{path:"/",exact:!0,component:_}),u.a.createElement(m.a,{path:"/about",component:v}))))};function k(){return u.a.createElement("div",{className:"app-main"},u.a.createElement(d,null),u.a.createElement(h,null),u.a.createElement(p.a,null),u.a.createElement(y,null))}Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function N(e){var t=e.container;i.a.render(u.a.createElement(k,null),t?t.querySelector("#root"):document.querySelector("#root"))}function g(e){e.onGlobalStateChange((function(t,n){return console.log("[onGlobalStateChange - ".concat(e.name,"]:"),t,n)}),!0),e.setGlobalState({ignore:e.name,user:{name:e.name}})}function C(){return j.apply(this,arguments)}function j(){return(j=Object(r.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("[react16] react app bootstraped");case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return O.apply(this,arguments)}function O(){return(O=Object(r.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("[react16] props from main framework",t),g(t),N(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){return A.apply(this,arguments)}function A(){return(A=Object(r.a)(o.a.mark((function e(t){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.container,i.a.unmountComponentAtNode(n?n.querySelector("#root"):document.querySelector("#root"));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}window.__POWERED_BY_QIANKUN__?n.p=window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__:N({}),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[102,1,2]]])})); 2 | //# sourceMappingURL=main.c77f4dd5.chunk.js.map -------------------------------------------------------------------------------- /react/src/serviceWorker.js: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read https://bit.ly/CRA-PWA 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === 'localhost' || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === '[::1]' || 17 | // 127.0.0.1/8 is considered localhost for IPv4. 18 | window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/), 19 | ); 20 | 21 | export function register(config) { 22 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 23 | // The URL constructor is available in all browsers that support SW. 24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); 25 | if (publicUrl.origin !== window.location.origin) { 26 | // Our service worker won't work if PUBLIC_URL is on a different origin 27 | // from what our page is served on. This might happen if a CDN is used to 28 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 29 | return; 30 | } 31 | 32 | window.addEventListener('load', () => { 33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 34 | 35 | if (isLocalhost) { 36 | // This is running on localhost. Let's check if a service worker still exists or not. 37 | checkValidServiceWorker(swUrl, config); 38 | 39 | // Add some additional logging to localhost, pointing developers to the 40 | // service worker/PWA documentation. 41 | navigator.serviceWorker.ready.then(() => { 42 | console.log( 43 | 'This web app is being served cache-first by a service ' + 44 | 'worker. To learn more, visit https://bit.ly/CRA-PWA', 45 | ); 46 | }); 47 | } else { 48 | // Is not localhost. Just register service worker 49 | registerValidSW(swUrl, config); 50 | } 51 | }); 52 | } 53 | } 54 | 55 | function registerValidSW(swUrl, config) { 56 | navigator.serviceWorker 57 | .register(swUrl) 58 | .then(registration => { 59 | registration.onupdatefound = () => { 60 | const installingWorker = registration.installing; 61 | if (installingWorker == null) { 62 | return; 63 | } 64 | installingWorker.onstatechange = () => { 65 | if (installingWorker.state === 'installed') { 66 | if (navigator.serviceWorker.controller) { 67 | // At this point, the updated precached content has been fetched, 68 | // but the previous service worker will still serve the older 69 | // content until all client tabs are closed. 70 | console.log( 71 | 'New content is available and will be used when all ' + 72 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.', 73 | ); 74 | 75 | // Execute callback 76 | if (config && config.onUpdate) { 77 | config.onUpdate(registration); 78 | } 79 | } else { 80 | // At this point, everything has been precached. 81 | // It's the perfect time to display a 82 | // "Content is cached for offline use." message. 83 | console.log('Content is cached for offline use.'); 84 | 85 | // Execute callback 86 | if (config && config.onSuccess) { 87 | config.onSuccess(registration); 88 | } 89 | } 90 | } 91 | }; 92 | }; 93 | }) 94 | .catch(error => { 95 | console.error('Error during service worker registration:', error); 96 | }); 97 | } 98 | 99 | function checkValidServiceWorker(swUrl, config) { 100 | // Check if the service worker can be found. If it can't reload the page. 101 | fetch(swUrl) 102 | .then(response => { 103 | // Ensure service worker exists, and that we really are getting a JS file. 104 | const contentType = response.headers.get('content-type'); 105 | if (response.status === 404 || (contentType != null && contentType.indexOf('javascript') === -1)) { 106 | // No service worker found. Probably a different app. Reload the page. 107 | navigator.serviceWorker.ready.then(registration => { 108 | registration.unregister().then(() => { 109 | window.location.reload(); 110 | }); 111 | }); 112 | } else { 113 | // Service worker found. Proceed as normal. 114 | registerValidSW(swUrl, config); 115 | } 116 | }) 117 | .catch(() => { 118 | console.log('No internet connection found. App is running in offline mode.'); 119 | }); 120 | } 121 | 122 | export function unregister() { 123 | if ('serviceWorker' in navigator) { 124 | navigator.serviceWorker.ready.then(registration => { 125 | registration.unregister(); 126 | }); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /vue-static/js/app.3630cf03.js: -------------------------------------------------------------------------------- 1 | (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["vue-app"]=t():e["vue-app"]=t()})(window,(function(){return function(e){function t(t){for(var r,u,l=t[0],s=t[1],i=t[2],c=0,f=[];ce(c)}).$mount(t?t.querySelector("#app"):"#app")}function $(e){e.onGlobalStateChange&&e.onGlobalStateChange((t,n)=>console.log(`[onGlobalStateChange - ${e.name}]:`,t,n),!0),e.setGlobalState&&e.setGlobalState({ignore:e.name,user:{name:e.name}})}async function T(){console.log("[vue] vue app bootstraped")}async function A(e){console.log("[vue] props from main framework",e),$(e),S(e)}async function H(){C.$destroy(),C.$el.innerHTML="",C=null,P=null}window.__POWERED_BY_QIANKUN__?n.p=window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__:S()},"5fbd":function(e,t,n){},"85ec":function(e,t,n){},"9a84":function(e,t,n){"use strict";n("5fbd")},cf05:function(e,t,n){e.exports=n.p+"img/logo.82b9c7a5.png"}})})); 2 | //# sourceMappingURL=app.3630cf03.js.map -------------------------------------------------------------------------------- /react/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /react-static/static/js/main.c77f4dd5.chunk.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../webpack/universalModuleDefinition","components/LibVersion.js","components/HelloModal.js","pages/Home.js","App.js","serviceWorker.js","index.js"],"names":["root","factory","exports","module","define","amd","window","className","reactVersion","antdVersion","useState","visible","setVisible","onClick","onOk","onCancel","title","style","borderColor","About","lazy","RouteExample","basename","__POWERED_BY_QIANKUN__","to","type","fallback","path","exact","component","Home","App","LibVersion","HelloModal","Boolean","location","hostname","match","render","props","container","ReactDOM","querySelector","document","storeTest","onGlobalStateChange","value","prev","console","log","name","setGlobalState","ignore","user","bootstrap","a","mount","unmount","unmountComponentAtNode","__webpack_public_path__","__INJECTED_PUBLIC_PATH_BY_QIANKUN__","navigator","serviceWorker","ready","then","registration","unregister"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,IACQ,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,kBAAZC,QACdA,QAAQ,cAAgBD,IAExBD,EAAK,cAAgBC,IARvB,CASGK,QAAQ,WACX,O,8YCPe,aACb,OACE,oCACE,wBAAIC,UAAU,aAAd,cACA,uBAAGA,UAAU,WAAb,kBACkBC,UADlB,mBACgDC,O,yBCLvC,aAAY,IAAD,EACMC,oBAAS,GADf,mBACjBC,EADiB,KACRC,EADQ,KAExB,OACE,oCACE,kBAAC,IAAD,CAAQC,QAAS,kBAAMD,GAAW,KAAlC,YACA,kBAAC,IAAD,CAAOD,QAASA,EAASG,KAAM,kBAAMF,GAAW,IAAQG,SAAU,kBAAMH,GAAW,IAAQI,MAAM,WAAjG,sECNS,aACb,OACE,wBAAIT,UAAU,eAAeU,MAAO,CAAEC,YAAa,QAAnD,SCOEC,EAAQC,gBAAK,kBAAM,iCAEnBC,EAAe,WACnB,OACE,kBAAC,IAAD,CAAQC,SAAUhB,OAAOiB,uBAAyB,SAAW,KAC3D,6BACE,kBAAC,IAAD,CAAMC,GAAG,KAAT,QACA,kBAAC,IAAD,CAASC,KAAK,aACd,kBAAC,IAAD,CAAMD,GAAG,UAAT,UAEF,kBAAC,WAAD,CAAUE,SAAU,MAClB,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAOC,KAAK,IAAIC,OAAK,EAACC,UAAWC,IACjC,kBAAC,IAAD,CAAOH,KAAK,SAASE,UAAWV,QAO3B,SAASY,IACtB,OACE,yBAAKxB,UAAU,YACb,kBAACyB,EAAD,MACA,kBAACC,EAAD,MAEA,kBAAC,IAAD,MAEA,kBAAC,EAAD,OC3BcC,QACW,cAA7B5B,OAAO6B,SAASC,UAEe,UAA7B9B,OAAO6B,SAASC,UAEhB9B,OAAO6B,SAASC,SAASC,MAAM,2DCZnC,SAASC,EAAOC,GAAQ,IACdC,EAAcD,EAAdC,UACRC,IAASH,OAAO,kBAAC,EAAD,MAASE,EAAYA,EAAUE,cAAc,SAAWC,SAASD,cAAc,UAGjG,SAASE,EAAUL,GACjBA,EAAMM,qBAAoB,SAACC,EAAOC,GAAR,OAAiBC,QAAQC,IAAR,iCAAsCV,EAAMW,KAA5C,MAAsDJ,EAAOC,MAAO,GAC/GR,EAAMY,eAAe,CACnBC,OAAQb,EAAMW,KACdG,KAAM,CACJH,KAAMX,EAAMW,QAYX,SAAeI,IAAtB,+B,4CAAO,sBAAAC,EAAA,sDACLP,QAAQC,IAAI,mCADP,4C,sBAIA,SAAeO,EAAtB,kC,4CAAO,WAAqBjB,GAArB,SAAAgB,EAAA,sDACLP,QAAQC,IAAI,sCAAuCV,GACnDK,EAAUL,GACVD,EAAOC,GAHF,4C,sBAMA,SAAekB,EAAtB,kC,4CAAO,WAAuBlB,GAAvB,eAAAgB,EAAA,sDACGf,EAAcD,EAAdC,UACRC,IAASiB,uBAAuBlB,EAAYA,EAAUE,cAAc,SAAWC,SAASD,cAAc,UAFjG,4C,sBAjBHpC,OAAOiB,uBAEToC,IAA0BrD,OAAOsD,oCAEjCtB,EAAO,IDkGH,kBAAmBuB,WACrBA,UAAUC,cAAcC,MAAMC,MAAK,SAAAC,GACjCA,EAAaC,kB","file":"static/js/main.c77f4dd5.chunk.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"react-main\"] = factory();\n\telse\n\t\troot[\"react-main\"] = factory();\n})(window, function() {\nreturn ","import React, { version as reactVersion } from 'react';\nimport { version as antdVersion } from 'antd';\n\nexport default function() {\n return (\n <>\n

React Demo

\n

\n React version: {reactVersion}, AntD version: {antdVersion}\n

\n \n );\n}\n","import React, { useState } from 'react';\nimport { Button, Modal } from 'antd';\n\nexport default function() {\n const [visible, setVisible] = useState(false);\n return (\n <>\n \n setVisible(false)} onCancel={() => setVisible(false)} title=\"qiankun\">\n Probably the most complete micro-frontends solution you ever met\n \n \n );\n}\n","import React from 'react';\n\nexport default function() {\n return (\n

\n Home\n

\n );\n}\n","import React, { lazy, Suspense } from 'react';\nimport { BrowserRouter as Router, Link, Route, Switch } from 'react-router-dom';\nimport { Divider } from 'antd';\n\nimport 'antd/dist/antd.min.css';\nimport './App.css';\n\nimport LibVersion from './components/LibVersion';\nimport HelloModal from './components/HelloModal';\n\nimport Home from './pages/Home';\nconst About = lazy(() => import('./pages/About'));\n\nconst RouteExample = () => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default function App() {\n return (\n
\n \n \n\n \n\n \n
\n );\n}\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA',\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (response.status === 404 || (contentType != null && contentType.indexOf('javascript') === -1)) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nfunction render(props) {\n const { container } = props;\n ReactDOM.render(, container ? container.querySelector('#root') : document.querySelector('#root'));\n}\n\nfunction storeTest(props) {\n props.onGlobalStateChange((value, prev) => console.log(`[onGlobalStateChange - ${props.name}]:`, value, prev), true);\n props.setGlobalState({\n ignore: props.name,\n user: {\n name: props.name,\n },\n });\n}\n\nif (window.__POWERED_BY_QIANKUN__) {\n // eslint-disable-next-line no-undef\n __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;\n} else {\n render({});\n}\n\nexport async function bootstrap() {\n console.log('[react16] react app bootstraped');\n}\n\nexport async function mount(props) {\n console.log('[react16] props from main framework', props);\n storeTest(props);\n render(props);\n}\n\nexport async function unmount(props) {\n const { container } = props;\n ReactDOM.unmountComponentAtNode(container ? container.querySelector('#root') : document.querySelector('#root'));\n}\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /react/build/static/js/main.c77f4dd5.chunk.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../webpack/universalModuleDefinition","components/LibVersion.js","components/HelloModal.js","pages/Home.js","App.js","serviceWorker.js","index.js"],"names":["root","factory","exports","module","define","amd","window","className","reactVersion","antdVersion","useState","visible","setVisible","onClick","onOk","onCancel","title","style","borderColor","About","lazy","RouteExample","basename","__POWERED_BY_QIANKUN__","to","type","fallback","path","exact","component","Home","App","LibVersion","HelloModal","Boolean","location","hostname","match","render","props","container","ReactDOM","querySelector","document","storeTest","onGlobalStateChange","value","prev","console","log","name","setGlobalState","ignore","user","bootstrap","a","mount","unmount","unmountComponentAtNode","__webpack_public_path__","__INJECTED_PUBLIC_PATH_BY_QIANKUN__","navigator","serviceWorker","ready","then","registration","unregister"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,IACQ,oBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,kBAAZC,QACdA,QAAQ,cAAgBD,IAExBD,EAAK,cAAgBC,IARvB,CASGK,QAAQ,WACX,O,8YCPe,aACb,OACE,oCACE,wBAAIC,UAAU,aAAd,cACA,uBAAGA,UAAU,WAAb,kBACkBC,UADlB,mBACgDC,O,yBCLvC,aAAY,IAAD,EACMC,oBAAS,GADf,mBACjBC,EADiB,KACRC,EADQ,KAExB,OACE,oCACE,kBAAC,IAAD,CAAQC,QAAS,kBAAMD,GAAW,KAAlC,YACA,kBAAC,IAAD,CAAOD,QAASA,EAASG,KAAM,kBAAMF,GAAW,IAAQG,SAAU,kBAAMH,GAAW,IAAQI,MAAM,WAAjG,sECNS,aACb,OACE,wBAAIT,UAAU,eAAeU,MAAO,CAAEC,YAAa,QAAnD,SCOEC,EAAQC,gBAAK,kBAAM,iCAEnBC,EAAe,WACnB,OACE,kBAAC,IAAD,CAAQC,SAAUhB,OAAOiB,uBAAyB,SAAW,KAC3D,6BACE,kBAAC,IAAD,CAAMC,GAAG,KAAT,QACA,kBAAC,IAAD,CAASC,KAAK,aACd,kBAAC,IAAD,CAAMD,GAAG,UAAT,UAEF,kBAAC,WAAD,CAAUE,SAAU,MAClB,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAOC,KAAK,IAAIC,OAAK,EAACC,UAAWC,IACjC,kBAAC,IAAD,CAAOH,KAAK,SAASE,UAAWV,QAO3B,SAASY,IACtB,OACE,yBAAKxB,UAAU,YACb,kBAACyB,EAAD,MACA,kBAACC,EAAD,MAEA,kBAAC,IAAD,MAEA,kBAAC,EAAD,OC3BcC,QACW,cAA7B5B,OAAO6B,SAASC,UAEe,UAA7B9B,OAAO6B,SAASC,UAEhB9B,OAAO6B,SAASC,SAASC,MAAM,2DCZnC,SAASC,EAAOC,GAAQ,IACdC,EAAcD,EAAdC,UACRC,IAASH,OAAO,kBAAC,EAAD,MAASE,EAAYA,EAAUE,cAAc,SAAWC,SAASD,cAAc,UAGjG,SAASE,EAAUL,GACjBA,EAAMM,qBAAoB,SAACC,EAAOC,GAAR,OAAiBC,QAAQC,IAAR,iCAAsCV,EAAMW,KAA5C,MAAsDJ,EAAOC,MAAO,GAC/GR,EAAMY,eAAe,CACnBC,OAAQb,EAAMW,KACdG,KAAM,CACJH,KAAMX,EAAMW,QAYX,SAAeI,IAAtB,+B,4CAAO,sBAAAC,EAAA,sDACLP,QAAQC,IAAI,mCADP,4C,sBAIA,SAAeO,EAAtB,kC,4CAAO,WAAqBjB,GAArB,SAAAgB,EAAA,sDACLP,QAAQC,IAAI,sCAAuCV,GACnDK,EAAUL,GACVD,EAAOC,GAHF,4C,sBAMA,SAAekB,EAAtB,kC,4CAAO,WAAuBlB,GAAvB,eAAAgB,EAAA,sDACGf,EAAcD,EAAdC,UACRC,IAASiB,uBAAuBlB,EAAYA,EAAUE,cAAc,SAAWC,SAASD,cAAc,UAFjG,4C,sBAjBHpC,OAAOiB,uBAEToC,IAA0BrD,OAAOsD,oCAEjCtB,EAAO,IDkGH,kBAAmBuB,WACrBA,UAAUC,cAAcC,MAAMC,MAAK,SAAAC,GACjCA,EAAaC,kB","file":"static/js/main.c77f4dd5.chunk.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"react-main\"] = factory();\n\telse\n\t\troot[\"react-main\"] = factory();\n})(window, function() {\nreturn ","import React, { version as reactVersion } from 'react';\nimport { version as antdVersion } from 'antd';\n\nexport default function() {\n return (\n <>\n

React Demo

\n

\n React version: {reactVersion}, AntD version: {antdVersion}\n

\n \n );\n}\n","import React, { useState } from 'react';\nimport { Button, Modal } from 'antd';\n\nexport default function() {\n const [visible, setVisible] = useState(false);\n return (\n <>\n \n setVisible(false)} onCancel={() => setVisible(false)} title=\"qiankun\">\n Probably the most complete micro-frontends solution you ever met\n \n \n );\n}\n","import React from 'react';\n\nexport default function() {\n return (\n

\n Home\n

\n );\n}\n","import React, { lazy, Suspense } from 'react';\nimport { BrowserRouter as Router, Link, Route, Switch } from 'react-router-dom';\nimport { Divider } from 'antd';\n\nimport 'antd/dist/antd.min.css';\nimport './App.css';\n\nimport LibVersion from './components/LibVersion';\nimport HelloModal from './components/HelloModal';\n\nimport Home from './pages/Home';\nconst About = lazy(() => import('./pages/About'));\n\nconst RouteExample = () => {\n return (\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default function App() {\n return (\n
\n \n \n\n \n\n \n
\n );\n}\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/),\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA',\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (response.status === 404 || (contentType != null && contentType.indexOf('javascript') === -1)) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log('No internet connection found. App is running in offline mode.');\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nfunction render(props) {\n const { container } = props;\n ReactDOM.render(, container ? container.querySelector('#root') : document.querySelector('#root'));\n}\n\nfunction storeTest(props) {\n props.onGlobalStateChange((value, prev) => console.log(`[onGlobalStateChange - ${props.name}]:`, value, prev), true);\n props.setGlobalState({\n ignore: props.name,\n user: {\n name: props.name,\n },\n });\n}\n\nif (window.__POWERED_BY_QIANKUN__) {\n // eslint-disable-next-line no-undef\n __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;\n} else {\n render({});\n}\n\nexport async function bootstrap() {\n console.log('[react16] react app bootstraped');\n}\n\nexport async function mount(props) {\n console.log('[react16] props from main framework', props);\n storeTest(props);\n render(props);\n}\n\nexport async function unmount(props) {\n const { container } = props;\n ReactDOM.unmountComponentAtNode(container ? container.querySelector('#root') : document.querySelector('#root'));\n}\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /react-static/static/js/runtime-main.728d58d7.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be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ChC,IAAI0C,EAAS1C,GAAUA,EAAOqD,WAC7B,WAAwB,OAAOrD,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoB8C,EAAEC,EAAQ,IAAKA,GAC5BA,GAIR/C,EAAoBgD,EAAI,SAASgB,EAAQC,GAAY,OAAOnF,OAAOC,UAAUC,eAAeC,KAAK+E,EAAQC,IAGzGjE,EAAoBuB,EAAI,IAGxBvB,EAAoBkE,GAAK,SAASC,GAA2B,MAApBC,QAAQ3C,MAAM0C,GAAYA,GAEnE,IAAIE,EAAaC,OAA2B,mBAAIA,OAA2B,oBAAK,GAC5EC,EAAmBF,EAAWlF,KAAK2E,KAAKO,GAC5CA,EAAWlF,KAAOf,EAClBiG,EAAaA,EAAWG,QACxB,IAAI,IAAI7F,EAAI,EAAGA,EAAI0F,EAAWxF,OAAQF,IAAKP,EAAqBiG,EAAW1F,IAC3E,IAAIU,EAAsBkF,EAI1B9E,I","file":"static/js/runtime-main.728d58d7.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/js/\" + ({}[chunkId]||chunkId) + \".\" + {\"3\":\"1c005ed2\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp_react\"] = window[\"webpackJsonp_react\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /react/build/static/js/runtime-main.728d58d7.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAI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iG,EAAW1F,IAC3E,IAAIU,EAAsBkF,EAI1B9E,I","file":"static/js/runtime-main.728d58d7.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"static/js/\" + ({}[chunkId]||chunkId) + \".\" + {\"3\":\"1c005ed2\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp_react\"] = window[\"webpackJsonp_react\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /main-static/js/app.1a025158.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?9b05","webpack:///./src/App.vue?3c2e","webpack:///src/App.vue","webpack:///./src/App.vue?8b47","webpack:///./src/App.vue","webpack:///./src/main.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","render","_vm","this","_h","$createElement","_c","_self","staticClass","_m","on","$event","_v","_e","attrs","staticRenderFns","props","loading","Boolean","methods","subapp","history","pushState","component","app","el","h","App","loader","entry","container","activeRule","beforeLoad","console","log","beforeMount","afterUnmount","onGlobalStateChange","setGlobalState","user","prev","ignore"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IAD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AmB,eAAgB,CAC5DC,KAAM,YAIVF,EAAoB,CAACpD,EAAOuD,IAASP,QAAQC,IAAI,kCAAmCjD,EAAOuD,IAG3FF,EAAe,CACXG,OAAQ,SACRF,KAAM,CACF/D,KAAM,YAOd,eAAmB,QAKnB,iBAEA,eAAqB,KACjByD,QAAQC,IAAI,kC","file":"js/app.1a025158.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"mainapp\"},[_vm._m(0),_c('div',{staticClass:\"mainapp-main\"},[_c('ul',{staticClass:\"mainapp-sidemenu\"},[_c('li',{on:{\"click\":function($event){return _vm.push('/vue')}}},[_vm._v(\"Vue\")]),_c('li',{on:{\"click\":function($event){return _vm.push('/react')}}},[_vm._v(\"React\")])]),_c('main',{staticClass:\"subapp-container\"},[(_vm.loading)?_c('h4',{staticClass:\"subapp-loading\"},[_vm._v(\"Loading...\")]):_vm._e(),_c('div',{attrs:{\"id\":\"subapp-viewport\"}})])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('header',{staticClass:\"mainapp-header\"},[_c('h1',[_vm._v(\"QianKun\")])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=74ad9c1a&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\r\nimport App from './App'\r\nimport { registerMicroApps, runAfterFirstMounted, setDefaultMountApp, start, initGlobalState } from 'qiankun'\r\n\r\nlet app = null\r\n\r\nfunction render({ loading }) {\r\n if (!app) {\r\n app = new Vue({\r\n el: '#app',\r\n data() {\r\n return {\r\n loading,\r\n }\r\n },\r\n render(h) {\r\n return h(App, {\r\n props: {\r\n loading: this.loading\r\n }\r\n })\r\n }\r\n });\r\n } else {\r\n app.loading = loading\r\n }\r\n}\r\n\r\n/**\r\n * Step1 初始化应用(可选)\r\n */\r\nrender({ loading: true })\r\n\r\nconst loader = (loading) => render({ loading })\r\n\r\n/**\r\n * Step2 注册子应用\r\n */\r\n\r\nregisterMicroApps(\r\n [\r\n {\r\n name: 'vue', // 子应用名称\r\n entry: '//localhost:8001', // 子应用入口地址\r\n container: '#subapp-viewport',\r\n loader,\r\n activeRule: '/vue', // 子应用触发路由\r\n },\r\n {\r\n name: 'react',\r\n entry: '//localhost:8002',\r\n container: '#subapp-viewport',\r\n loader,\r\n activeRule: '/react',\r\n },\r\n ],\r\n // 子应用生命周期事件\r\n {\r\n beforeLoad: [\r\n app => {\r\n console.log('[LifeCycle] before load %c%s', 'color: green', app.name)\r\n },\r\n ],\r\n beforeMount: [\r\n app => {\r\n console.log('[LifeCycle] before mount %c%s', 'color: green', app.name)\r\n },\r\n ],\r\n afterUnmount: [\r\n app => {\r\n console.log('[LifeCycle] after unmount %c%s', 'color: green', app.name)\r\n },\r\n ],\r\n },\r\n)\r\n\r\n// 定义全局状态,可以在主应用、子应用中使用\r\nconst { onGlobalStateChange, setGlobalState } = initGlobalState({\r\n user: 'qiankun',\r\n})\r\n\r\n// 监听全局状态变化\r\nonGlobalStateChange((value, prev) => console.log('[onGlobalStateChange - master]:', value, prev))\r\n\r\n// 设置全局状态\r\nsetGlobalState({\r\n ignore: 'master',\r\n user: {\r\n name: 'master',\r\n },\r\n})\r\n\r\n/**\r\n * Step3 设置默认进入的子应用\r\n */\r\nsetDefaultMountApp('/vue')\r\n\r\n/**\r\n * Step4 启动应用\r\n */\r\nstart()\r\n\r\nrunAfterFirstMounted(() => {\r\n console.log('[MainApp] first app mounted')\r\n})\r\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /vue-static/js/app.3630cf03.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack://vue-[name]/webpack/universalModuleDefinition","webpack://vue-[name]/webpack/bootstrap","webpack://vue-[name]/./src/App.vue?9b05","webpack://vue-[name]/./src/App.vue?4bd5","webpack://vue-[name]/./src/App.vue","webpack://vue-[name]/./src/views/Home.vue?b397","webpack://vue-[name]/./src/components/HelloWorld.vue?a8c3","webpack://vue-[name]/src/components/HelloWorld.vue","webpack://vue-[name]/./src/components/HelloWorld.vue?b85e","webpack://vue-[name]/./src/components/HelloWorld.vue","webpack://vue-[name]/src/views/Home.vue","webpack://vue-[name]/./src/views/Home.vue?2db0","webpack://vue-[name]/./src/views/Home.vue","webpack://vue-[name]/./src/router/index.js","webpack://vue-[name]/./src/store/index.js","webpack://vue-[name]/./src/main.js","webpack://vue-[name]/./src/components/HelloWorld.vue?8046","webpack://vue-[name]/./src/assets/logo.png"],"names":["root","factory","exports","module","define","amd","window","webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","jsonpScriptSrc","p","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","oldJsonpFunction","slice","render","_vm","this","_h","$createElement","_c","_self","attrs","_v","staticRenderFns","component","staticClass","_s","msg","_m","props","String","components","HelloWorld","use","routes","path","Home","Store","state","mutations","actions","config","productionTip","instance","container","base","__POWERED_BY_QIANKUN__","router","store","h","App","$mount","querySelector","storeTest","onGlobalStateChange","prev","log","setGlobalState","ignore","user","async","bootstrap","mount","unmount","$destroy","$el","innerHTML","__INJECTED_PUBLIC_PATH_BY_QIAN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EPC,UAAW,GAEXC,QAAS,GAET3G,QAAS,KCNX,OAAI4G,OAAOC,eAAgB,EAE3B,IAAI,EAAS,KACTC,EAAW,KAEf,SAAS,EAAOd,EAAQ,IACpB,MAAM,UAAEe,GAAcf,EACtB,EAAS,IAAI,OAAU,CAEnBgB,KAAMjI,OAAOkI,uBAAyB,OAAS,IAC/C/C,KAAM,UACNmC,OAAA,IAGJS,EAAW,IAAI,OAAI,CACfI,OAAM,EACNC,QACAlC,OAAQmC,GAAKA,EAAEC,KAChBC,OAAOP,EAAYA,EAAUQ,cAAc,QAAU,QAU5D,SAASC,EAAUxB,GACfA,EAAMyB,qBACFzB,EAAMyB,oBACF,CAACzD,EAAO0D,IAAS7C,QAAQ8C,IAAI,0BAA0B3B,EAAMlD,SAAUkB,EAAO0D,IAC9E,GAER1B,EAAM4B,gBACF5B,EAAM4B,eAAe,CACjBC,OAAQ7B,EAAMlD,KACdgF,KAAM,CACFhF,KAAMkD,EAAMlD,QAKrBiF,eAAeC,IAClBnD,QAAQ8C,IAAI,6BAGTI,eAAeE,EAAMjC,GACxBnB,QAAQ8C,IAAI,kCAAmC3B,GAC/CwB,EAAUxB,GACV,EAAOA,GAGJ+B,eAAeG,IAClBpB,EAASqB,WACTrB,EAASsB,IAAIC,UAAY,GACzBvB,EAAW,KACX,EAAS,KApCT/H,OAAOkI,uBAEP,IAA0BlI,OAAOuJ,oCAEjC,K,sFC/BJ,W,qBCAA1J,EAAOD,QAAU,IAA0B","file":"js/app.3630cf03.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"vue-app\"] = factory();\n\telse\n\t\troot[\"vue-app\"] = factory();\n})(window, function() {\nreturn "," \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({\"about\":\"about\"}[chunkId]||chunkId) + \".\" + {\"about\":\"b7915347\"}[chunkId] + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp_vue\"] = window[\"webpackJsonp_vue\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('div',{attrs:{\"id\":\"nav\"}},[_c('router-link',{attrs:{\"to\":\"/\"}},[_vm._v(\"Home\")]),_vm._v(\" | \"),_c('router-link',{attrs:{\"to\":\"/about\"}},[_vm._v(\"About\")])],1),_c('router-view')],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=24a3caee&\"\nvar script = {}\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"home\"},[_c('img',{attrs:{\"alt\":\"Vue logo\",\"src\":require(\"../assets/logo.png\")}}),_c('HelloWorld',{attrs:{\"msg\":\"Welcome to Your Vue.js App\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"hello\"},[_c('h1',[_vm._v(_vm._s(_vm.msg))]),_vm._m(0),_c('h3',[_vm._v(\"Installed CLI Plugins\")]),_c('ul'),_c('h3',[_vm._v(\"Essential Links\")]),_vm._m(1),_c('h3',[_vm._v(\"Ecosystem\")]),_vm._m(2)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_vm._v(\" For a guide and recipes on how to configure / customize this project,\"),_c('br'),_vm._v(\" check out the \"),_c('a',{attrs:{\"href\":\"https://cli.vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"vue-cli documentation\")]),_vm._v(\". \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_c('li',[_c('a',{attrs:{\"href\":\"https://vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"Core Docs\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://forum.vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"Forum\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://chat.vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"Community Chat\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://twitter.com/vuejs\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"Twitter\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://news.vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"News\")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('ul',[_c('li',[_c('a',{attrs:{\"href\":\"https://router.vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"vue-router\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://vuex.vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"vuex\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://github.com/vuejs/vue-devtools#vue-devtools\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"vue-devtools\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://vue-loader.vuejs.org\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"vue-loader\")])]),_c('li',[_c('a',{attrs:{\"href\":\"https://github.com/vuejs/awesome-vue\",\"target\":\"_blank\",\"rel\":\"noopener\"}},[_vm._v(\"awesome-vue\")])])])}]\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./HelloWorld.vue?vue&type=template&id=574af232&scoped=true&\"\nimport script from \"./HelloWorld.vue?vue&type=script&lang=js&\"\nexport * from \"./HelloWorld.vue?vue&type=script&lang=js&\"\nimport style0 from \"./HelloWorld.vue?vue&type=style&index=0&id=574af232&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"574af232\",\n null\n \n)\n\nexport default component.exports","\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Home.vue?vue&type=template&id=164a8bb2&\"\nimport script from \"./Home.vue?vue&type=script&lang=js&\"\nexport * from \"./Home.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport Home from '../views/Home.vue'\n\nVue.use(VueRouter)\n\nconst routes = [\n {\n path: '/',\n name: 'Home',\n component: Home\n },\n {\n path: '/about',\n name: 'About',\n // route level code-splitting\n // this generates a separate chunk (about.[hash].js) for this route\n // which is lazy-loaded when the route is visited.\n component: function () {\n return import(/* webpackChunkName: \"about\" */ '../views/About.vue')\n }\n }\n]\n\nexport default routes\n","import Vue from 'vue'\nimport Vuex from 'vuex'\n\nVue.use(Vuex)\n\nexport default new Vuex.Store({\n state: {\n },\n mutations: {\n },\n actions: {\n },\n modules: {\n }\n})\n","import Vue from 'vue'\r\nimport VueRouter from 'vue-router'\r\nimport App from './App.vue'\r\nimport routes from './router'\r\nimport store from './store'\r\n\r\nVue.config.productionTip = false\r\n\r\nlet router = null\r\nlet instance = null\r\n\r\nfunction render(props = {}) {\r\n const { container } = props\r\n router = new VueRouter({\r\n // hash 模式不需要下面两行\r\n base: window.__POWERED_BY_QIANKUN__ ? '/vue' : '/',\r\n mode: 'history',\r\n routes,\r\n })\r\n\r\n instance = new Vue({\r\n router,\r\n store,\r\n render: h => h(App),\r\n }).$mount(container ? container.querySelector('#app') : '#app')\r\n}\r\n\r\nif (window.__POWERED_BY_QIANKUN__) {\r\n // eslint-disable-next-line no-undef\r\n __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;\r\n} else {\r\n render()\r\n}\r\n\r\nfunction storeTest(props) {\r\n props.onGlobalStateChange &&\r\n props.onGlobalStateChange(\r\n (value, prev) => console.log(`[onGlobalStateChange - ${props.name}]:`, value, prev),\r\n true,\r\n )\r\n props.setGlobalState &&\r\n props.setGlobalState({\r\n ignore: props.name,\r\n user: {\r\n name: props.name,\r\n },\r\n })\r\n}\r\n\r\nexport async function bootstrap() {\r\n console.log('[vue] vue app bootstraped')\r\n}\r\n\r\nexport async function mount(props) {\r\n console.log('[vue] props from main framework', props)\r\n storeTest(props)\r\n render(props)\r\n}\r\n\r\nexport async function unmount() {\r\n instance.$destroy()\r\n instance.$el.innerHTML = ''\r\n instance = null\r\n router = null\r\n}\r\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HelloWorld.vue?vue&type=style&index=0&id=574af232&scoped=true&lang=css&\"","module.exports = __webpack_public_path__ + \"img/logo.82b9c7a5.png\";"],"sourceRoot":""} --------------------------------------------------------------------------------