├── pnpm-workspace.yaml ├── packages ├── wujie-demo │ ├── vite-child │ │ ├── .env.development │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── views │ │ │ │ ├── CommunicationTest │ │ │ │ │ └── index.module.less │ │ │ │ ├── CssIsolation │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ └── TabView │ │ │ │ │ └── index.tsx │ │ │ ├── components │ │ │ │ ├── Counter │ │ │ │ │ └── index.module.less │ │ │ │ └── UserInfo │ │ │ │ │ └── index.tsx │ │ │ ├── stores │ │ │ │ ├── storeHooks.ts │ │ │ │ ├── store.ts │ │ │ │ ├── userSlice.ts │ │ │ │ └── counterSlice.ts │ │ │ ├── wujie-helper.d.ts │ │ │ └── reset.css │ │ ├── .env.production │ │ ├── tsconfig.node.json │ │ ├── index.html │ │ ├── tsconfig.json │ │ └── package.json │ ├── vue2-child │ │ ├── .env.development │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ └── reset.less │ │ │ ├── shims-vue.d.ts │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── layout │ │ │ │ └── Layout.vue │ │ │ ├── views │ │ │ │ ├── CoexistView.vue │ │ │ │ └── TabView.vue │ │ │ ├── App.vue │ │ │ ├── shims-tsx.d.ts │ │ │ ├── wujie-helper.d.ts │ │ │ └── stores │ │ │ │ ├── counter.ts │ │ │ │ └── user.ts │ │ ├── .browserslistrc │ │ ├── .env.production │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── babel.config.js │ │ ├── vue.config.js │ │ └── .eslintrc.js │ ├── vue3-main │ │ ├── env.d.ts │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ ├── app.less │ │ │ │ └── reset.less │ │ │ ├── App.vue │ │ │ ├── utils │ │ │ │ └── microAppLoading.ts │ │ │ ├── data │ │ │ │ ├── userData.ts │ │ │ │ └── appData.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ ├── stores │ │ │ │ ├── counter.ts │ │ │ │ ├── app.ts │ │ │ │ └── user.ts │ │ │ ├── main.ts │ │ │ └── views │ │ │ │ ├── ViteKeepAliveView.vue │ │ │ │ ├── Vue2KeepAliveView.vue │ │ │ │ └── React18KeepAliveView.vue │ │ ├── .prettierrc.json │ │ ├── public │ │ │ └── favicon.ico │ │ ├── .env.development │ │ ├── tsconfig.config.json │ │ ├── .env.production │ │ ├── tsconfig.json │ │ ├── .eslintrc.cjs │ │ └── index.html │ └── react-child │ │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ └── manifest.json │ │ ├── .env.development │ │ ├── src │ │ ├── react-app-env.d.ts │ │ ├── views │ │ │ ├── CssIsolation │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ └── TabView │ │ │ │ └── index.tsx │ │ ├── components │ │ │ ├── Counter │ │ │ │ └── index.module.less │ │ │ └── UserInfo │ │ │ │ └── index.tsx │ │ ├── setupTests.ts │ │ ├── stores │ │ │ ├── storeHooks.ts │ │ │ ├── store.ts │ │ │ ├── userSlice.ts │ │ │ └── counterSlice.ts │ │ ├── wujie-helper.d.ts │ │ └── reset.css │ │ ├── .env.production │ │ └── tsconfig.json ├── garfish-demo │ ├── vue2-child │ │ ├── .env.development │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ └── reset.less │ │ │ ├── shims-vue.d.ts │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── garfish-helper.d.ts │ │ │ ├── layout │ │ │ │ └── Layout.vue │ │ │ ├── views │ │ │ │ ├── CoexistView.vue │ │ │ │ └── TabView.vue │ │ │ ├── shims-tsx.d.ts │ │ │ ├── stores │ │ │ │ ├── counter.ts │ │ │ │ └── user.ts │ │ │ └── App.vue │ │ ├── .browserslistrc │ │ ├── .env.production │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── babel.config.js │ │ └── .eslintrc.js │ ├── vue3-main │ │ ├── env.d.ts │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ ├── app.less │ │ │ │ └── reset.less │ │ │ ├── utils │ │ │ │ ├── microAppLoading.ts │ │ │ │ ├── preloadApp.ts │ │ │ │ └── messageListener.ts │ │ │ ├── App.vue │ │ │ ├── data │ │ │ │ ├── userData.ts │ │ │ │ └── appData.ts │ │ │ ├── views │ │ │ │ ├── KeepAliveView.vue │ │ │ │ └── CommunicationTest.vue │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ ├── stores │ │ │ │ ├── counter.ts │ │ │ │ ├── app.ts │ │ │ │ └── user.ts │ │ │ └── main.ts │ │ ├── .prettierrc.json │ │ ├── public │ │ │ └── favicon.ico │ │ ├── .env.development │ │ ├── tsconfig.config.json │ │ ├── .env.production │ │ ├── tsconfig.json │ │ ├── .eslintrc.cjs │ │ └── index.html │ ├── vite-child │ │ ├── .env.development │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── views │ │ │ │ ├── CommunicationTest │ │ │ │ │ └── index.module.less │ │ │ │ ├── CssIsolation │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ └── TabView │ │ │ │ │ └── index.tsx │ │ │ ├── garfish-helper.d.ts │ │ │ ├── components │ │ │ │ ├── Counter │ │ │ │ │ └── index.module.less │ │ │ │ └── UserInfo │ │ │ │ │ └── index.tsx │ │ │ ├── stores │ │ │ │ ├── storeHooks.ts │ │ │ │ ├── store.ts │ │ │ │ ├── userSlice.ts │ │ │ │ └── counterSlice.ts │ │ │ └── reset.css │ │ ├── .env.production │ │ ├── tsconfig.node.json │ │ ├── index.html │ │ ├── tsconfig.json │ │ └── package.json │ └── react-child │ │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ └── manifest.json │ │ ├── src │ │ ├── garfish-helper.d.ts │ │ ├── react-app-env.d.ts │ │ ├── views │ │ │ ├── CssIsolation │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ └── TabView │ │ │ │ └── index.tsx │ │ ├── setupTests.ts │ │ ├── components │ │ │ ├── Counter │ │ │ │ └── index.module.less │ │ │ └── UserInfo │ │ │ │ └── index.tsx │ │ ├── stores │ │ │ ├── storeHooks.ts │ │ │ ├── store.ts │ │ │ ├── userSlice.ts │ │ │ └── counterSlice.ts │ │ └── reset.css │ │ ├── .env.development │ │ ├── .env.production │ │ └── tsconfig.json ├── icestark-demo │ ├── vite-child │ │ ├── .env.development │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── views │ │ │ │ └── CommunicationTest │ │ │ │ │ └── index.module.less │ │ │ ├── components │ │ │ │ ├── Counter │ │ │ │ │ └── index.module.less │ │ │ │ └── UserInfo │ │ │ │ │ └── index.tsx │ │ │ ├── stores │ │ │ │ ├── storeHooks.ts │ │ │ │ ├── store.ts │ │ │ │ ├── userSlice.ts │ │ │ │ └── counterSlice.ts │ │ │ └── reset.css │ │ ├── .env.production │ │ ├── tsconfig.node.json │ │ ├── index.html │ │ └── tsconfig.json │ ├── vue2-child │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ └── reset.less │ │ │ ├── shims-vue.d.ts │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── modules │ │ │ │ ├── tabView.ts │ │ │ │ ├── cssIsolation.ts │ │ │ │ ├── navigateView.ts │ │ │ │ └── communicationTest.ts │ │ │ ├── layout │ │ │ │ └── Layout.vue │ │ │ ├── views │ │ │ │ ├── CoexistView.vue │ │ │ │ └── TabView.vue │ │ │ ├── shims-tsx.d.ts │ │ │ ├── stores │ │ │ │ ├── counter.ts │ │ │ │ └── user.ts │ │ │ └── App.vue │ │ ├── .browserslistrc │ │ ├── .env.development │ │ ├── .env.production │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── babel.config.js │ │ └── .eslintrc.js │ ├── vue3-main │ │ ├── env.d.ts │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ ├── app.less │ │ │ │ └── reset.less │ │ │ ├── utils │ │ │ │ ├── microAppLoading.ts │ │ │ │ └── messageListener.ts │ │ │ ├── App.vue │ │ │ ├── data │ │ │ │ ├── userData.ts │ │ │ │ └── appData.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ ├── stores │ │ │ │ ├── app.ts │ │ │ │ ├── counter.ts │ │ │ │ └── user.ts │ │ │ ├── main.ts │ │ │ └── views │ │ │ │ └── CommunicationTest.vue │ │ ├── .prettierrc.json │ │ ├── public │ │ │ └── favicon.ico │ │ ├── .env.development │ │ ├── tsconfig.config.json │ │ ├── tsconfig.json │ │ ├── .env.production │ │ ├── .eslintrc.cjs │ │ └── index.html │ └── react-child │ │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ └── manifest.json │ │ ├── .env.development │ │ ├── src │ │ ├── modules │ │ │ ├── tabView.tsx │ │ │ ├── cssIsolation.tsx │ │ │ └── communicationTest.tsx │ │ ├── react-app-env.d.ts │ │ ├── views │ │ │ ├── CssIsolation │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ └── TabView │ │ │ │ └── index.tsx │ │ ├── setupTests.ts │ │ ├── components │ │ │ ├── Counter │ │ │ │ └── index.module.less │ │ │ └── UserInfo │ │ │ │ └── index.tsx │ │ ├── stores │ │ │ ├── storeHooks.ts │ │ │ ├── store.ts │ │ │ ├── userSlice.ts │ │ │ └── counterSlice.ts │ │ └── reset.css │ │ ├── .env.production │ │ └── tsconfig.json ├── micro-app-demo │ ├── vue2-child │ │ ├── .env.development │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ └── reset.less │ │ │ ├── shims-vue.d.ts │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── public-path.ts │ │ │ ├── layout │ │ │ │ └── Layout.vue │ │ │ ├── views │ │ │ │ ├── CoexistView.vue │ │ │ │ └── TabView.vue │ │ │ ├── shims-tsx.d.ts │ │ │ ├── micro-app-helper.ts │ │ │ └── stores │ │ │ │ ├── counter.ts │ │ │ │ └── user.ts │ │ ├── .browserslistrc │ │ ├── .env.production │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── babel.config.js │ │ └── .eslintrc.js │ ├── vite-child │ │ ├── .env.development │ │ ├── src │ │ │ ├── vite-env.d.ts │ │ │ ├── views │ │ │ │ ├── CommunicationTest │ │ │ │ │ └── index.module.less │ │ │ │ └── TabView │ │ │ │ │ └── index.tsx │ │ │ ├── public-path.ts │ │ │ ├── components │ │ │ │ ├── Counter │ │ │ │ │ └── index.module.less │ │ │ │ └── UserInfo │ │ │ │ │ └── index.tsx │ │ │ ├── micro-app-helper.ts │ │ │ ├── stores │ │ │ │ ├── storeHooks.ts │ │ │ │ ├── store.ts │ │ │ │ ├── userSlice.ts │ │ │ │ └── counterSlice.ts │ │ │ └── reset.css │ │ ├── .env.production │ │ ├── tsconfig.node.json │ │ ├── index.html │ │ ├── tsconfig.json │ │ └── package.json │ ├── vue3-main │ │ ├── env.d.ts │ │ ├── src │ │ │ ├── styles │ │ │ │ ├── index.less │ │ │ │ ├── app.less │ │ │ │ └── reset.less │ │ │ ├── micro-app-helper.ts │ │ │ ├── utils │ │ │ │ └── microAppLoading.ts │ │ │ ├── App.vue │ │ │ ├── data │ │ │ │ ├── userData.ts │ │ │ │ └── appData.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ ├── stores │ │ │ │ ├── user.ts │ │ │ │ ├── counter.ts │ │ │ │ └── app.ts │ │ │ └── types │ │ │ │ └── microAppDataListenerTypes.ts │ │ ├── .prettierrc.json │ │ ├── public │ │ │ └── favicon.ico │ │ ├── .env.development │ │ ├── tsconfig.config.json │ │ ├── .env.production │ │ ├── .eslintrc.cjs │ │ ├── index.html │ │ └── tsconfig.json │ └── react-child │ │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ └── manifest.json │ │ ├── .env.development │ │ ├── src │ │ ├── public-path.ts │ │ ├── react-app-env.d.ts │ │ ├── views │ │ │ ├── CssIsolation │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ └── TabView │ │ │ │ └── index.tsx │ │ ├── components │ │ │ ├── Counter │ │ │ │ └── index.module.less │ │ │ └── UserInfo │ │ │ │ └── index.tsx │ │ ├── setupTests.ts │ │ ├── stores │ │ │ ├── storeHooks.ts │ │ │ ├── store.ts │ │ │ ├── userSlice.ts │ │ │ └── counterSlice.ts │ │ ├── micro-app-helper.ts │ │ └── reset.css │ │ ├── .env.production │ │ └── tsconfig.json └── qiankun-demo │ ├── vite-child │ ├── .env.development │ ├── src │ │ ├── vite-env.d.ts │ │ ├── views │ │ │ ├── CommunicationTest │ │ │ │ └── index.module.less │ │ │ └── TabView │ │ │ │ └── index.tsx │ │ ├── qiankun-helper.d.ts │ │ ├── public-path.ts │ │ ├── components │ │ │ ├── Counter │ │ │ │ └── index.module.less │ │ │ └── UserInfo │ │ │ │ └── index.tsx │ │ ├── stores │ │ │ ├── storeHooks.ts │ │ │ ├── store.ts │ │ │ ├── userSlice.ts │ │ │ └── counterSlice.ts │ │ ├── reset.css │ │ └── utils │ │ │ └── dispatchReceiveMessageEvent.ts │ ├── .env.production │ ├── tsconfig.node.json │ ├── index.html │ ├── tsconfig.json │ └── package.json │ ├── vue2-child │ ├── .env.development │ ├── src │ │ ├── styles │ │ │ ├── index.less │ │ │ └── reset.less │ │ ├── shims-vue.d.ts │ │ ├── assets │ │ │ └── logo.png │ │ ├── public-path.ts │ │ ├── qiankun-helper.d.ts │ │ ├── layout │ │ │ └── Layout.vue │ │ ├── views │ │ │ ├── CoexistView.vue │ │ │ └── TabView.vue │ │ ├── shims-tsx.d.ts │ │ ├── stores │ │ │ ├── counter.ts │ │ │ └── user.ts │ │ ├── utils │ │ │ └── dispatchReceiveMessageEvent.ts │ │ └── App.vue │ ├── .browserslistrc │ ├── .env.production │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ ├── babel.config.js │ └── .eslintrc.js │ ├── vue3-main │ ├── env.d.ts │ ├── src │ │ ├── styles │ │ │ ├── index.less │ │ │ ├── app.less │ │ │ └── reset.less │ │ ├── utils │ │ │ ├── microAppLoading.ts │ │ │ └── dispatchUserEvent.ts │ │ ├── App.vue │ │ ├── data │ │ │ ├── userData.ts │ │ │ └── appData.ts │ │ ├── assets │ │ │ └── logo.svg │ │ ├── main.ts │ │ ├── stores │ │ │ ├── counter.ts │ │ │ ├── user.ts │ │ │ └── app.ts │ │ └── views │ │ │ └── CommunicationTest.vue │ ├── .prettierrc.json │ ├── public │ │ └── favicon.ico │ ├── .env.development │ ├── tsconfig.config.json │ ├── .env.production │ ├── tsconfig.json │ ├── .eslintrc.cjs │ └── index.html │ └── react-child │ ├── public │ ├── robots.txt │ ├── favicon.ico │ ├── logo192.png │ ├── logo512.png │ └── manifest.json │ ├── .env.development │ ├── src │ ├── qiankun-helper.d.ts │ ├── react-app-env.d.ts │ ├── public-path.ts │ ├── views │ │ ├── CssIsolation │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ └── TabView │ │ │ └── index.tsx │ ├── setupTests.ts │ ├── components │ │ ├── Counter │ │ │ └── index.module.less │ │ └── UserInfo │ │ │ └── index.tsx │ ├── stores │ │ ├── storeHooks.ts │ │ ├── store.ts │ │ ├── userSlice.ts │ │ └── counterSlice.ts │ ├── reportWebVitals.ts │ ├── reset.css │ └── utils │ │ └── dispatchReceiveMessageEvent.ts │ ├── .env.production │ └── tsconfig.json ├── .husky └── commit-msg ├── .gitignore └── commitlint.config.js /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/**' 3 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/ -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/ -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/ -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/ -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/vite/ 2 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=http://localhost:8093/ 2 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/.env.development: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=http://localhost:8091/ -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | @import './app'; 3 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | @import './app'; 3 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | @import './app'; 3 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | @import './app'; 3 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/styles/index.less: -------------------------------------------------------------------------------- 1 | @import './reset'; 2 | @import './app'; 3 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/garfish-demo/vite-child/ 2 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/qiankun-demo/vite-child/ 2 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/wujie-demo/vite-child/ 2 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/micro-app-demos/wujie-demo/vue2-child/ -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/micro-app-demos/garfish-demo/vue2-child/ -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/icestark-demo/vite-child/ 2 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/micro-app-demos/icestark-demo/vue2-child/ -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/micro-app-demos/micro-app-demo/vue2-child/ -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/.env.production: -------------------------------------------------------------------------------- 1 | VUE_APP_PUBLIC_PATH=/micro-app-demos/qiankun-demo/vue2-child/ -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/views/CommunicationTest/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no -- commitlint --edit 5 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/views/CommunicationTest/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/views/CommunicationTest/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/views/CommunicationTest/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/views/CommunicationTest/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | } 4 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=https://maxlz1.github.io/micro-app-demos/micro-app-demo/vite-child/ 2 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | CommunicationTest-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/styles/app.less: -------------------------------------------------------------------------------- 1 | html, body, #app { 2 | height: 100%; 3 | width: 100%; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | CommunicationTest-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import Vue from 'vue' 3 | export default Vue 4 | } 5 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/styles/app.less: -------------------------------------------------------------------------------- 1 | html, body, #app { 2 | height: 100%; 3 | width: 100%; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | CommunicationTest-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/styles/app.less: -------------------------------------------------------------------------------- 1 | html, body, #app { 2 | height: 100%; 3 | width: 100%; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | CommunicationTest-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/styles/app.less: -------------------------------------------------------------------------------- 1 | html, body, #app { 2 | height: 100%; 3 | width: 100%; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | CommunicationTest-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/styles/app.less: -------------------------------------------------------------------------------- 1 | html, body, #app { 2 | height: 100%; 3 | width: 100%; 4 | overflow: hidden; 5 | } 6 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/.env.development: -------------------------------------------------------------------------------- 1 | PUBLIC_URL=http://localhost:8092/ 2 | 3 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=http://localhost:8091 4 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false, 4 | "tabWidth": 2, 5 | "trailingComma": "none" 6 | } -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false, 4 | "tabWidth": 2, 5 | "trailingComma": "none" 6 | } -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/garfish-demo/vue3-main/public/favicon.ico -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false, 4 | "tabWidth": 2, 5 | "trailingComma": "none" 6 | } -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false, 4 | "tabWidth": 2, 5 | "trailingComma": "none" 6 | } -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "semi": false, 4 | "tabWidth": 2, 5 | "trailingComma": "none" 6 | } -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/qiankun-demo/vue3-main/public/favicon.ico -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/wujie-demo/react-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/wujie-demo/react-child/public/logo192.png -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/wujie-demo/react-child/public/logo512.png -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/wujie-demo/vue2-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/wujie-demo/vue2-child/src/assets/logo.png -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/wujie-demo/vue3-main/public/favicon.ico -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/garfish-demo/react-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/garfish-demo/react-child/public/logo192.png -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/garfish-demo/react-child/public/logo512.png -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/garfish-demo/vue2-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/garfish-demo/vue2-child/src/assets/logo.png -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/icestark-demo/vue2-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/icestark-demo/vue3-main/public/favicon.ico -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/micro-app-demo/vue3-main/public/favicon.ico -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/qiankun-demo/react-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/qiankun-demo/react-child/public/logo192.png -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/qiankun-demo/react-child/public/logo512.png -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/qiankun-demo/vue2-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/qiankun-demo/vue2-child/src/assets/logo.png -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/icestark-demo/react-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/icestark-demo/react-child/public/logo192.png -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/icestark-demo/react-child/public/logo512.png -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/icestark-demo/vue2-child/src/assets/logo.png -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/micro-app-demo/react-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/micro-app-demo/react-child/public/logo192.png -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/micro-app-demo/react-child/public/logo512.png -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/micro-app-demo/vue2-child/public/favicon.ico -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MAXLZ1/micro-app-demos/HEAD/packages/micro-app-demo/vue2-child/src/assets/logo.png -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/modules/tabView.tsx: -------------------------------------------------------------------------------- 1 | export { mount, unmount } from '@/modules/moduleLifeCycle' 2 | 3 | export { default } from '@/views/TabView' 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/modules/tabView.ts: -------------------------------------------------------------------------------- 1 | export { default } from '@/views/TabView.vue' 2 | 3 | export { mount, unmount } from '@/modules/moduleLifeCycle' 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/modules/cssIsolation.tsx: -------------------------------------------------------------------------------- 1 | export { mount, unmount } from '@/modules/moduleLifeCycle' 2 | 3 | export { default } from '@/views/CssIsolation' 4 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/garfish-helper.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __GARFISH__: boolean 4 | Garfish?: any 5 | } 6 | } 7 | 8 | export {} 9 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/garfish-helper.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __GARFISH__: boolean 4 | Garfish?: any 5 | } 6 | } 7 | 8 | export {} 9 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/modules/cssIsolation.ts: -------------------------------------------------------------------------------- 1 | export { default } from '@/views/CssIsolation.vue' 2 | 3 | export { mount, unmount } from '@/modules/moduleLifeCycle' 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/modules/navigateView.ts: -------------------------------------------------------------------------------- 1 | export { default } from '@/views/NavigateView.vue' 2 | 3 | export { mount, unmount } from '@/modules/moduleLifeCycle' 4 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/modules/communicationTest.tsx: -------------------------------------------------------------------------------- 1 | export { mount, unmount } from '@/modules/moduleLifeCycle' 2 | 3 | export { default } from '@/views/CommunicationTest' 4 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/.env.development: -------------------------------------------------------------------------------- 1 | PUBLIC_URL=/ 2 | 3 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=http://localhost:8091 4 | 5 | REACT_APP_VITE_CHILD_PUBLIC_PATH=http://localhost:8093 6 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/modules/communicationTest.ts: -------------------------------------------------------------------------------- 1 | export { default } from '@/views/CommunicationTest.vue' 2 | 3 | export { mount, unmount } from '@/modules/moduleLifeCycle' 4 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/.env.development: -------------------------------------------------------------------------------- 1 | PUBLIC_URL=/ 2 | 3 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=http://localhost:8091 4 | 5 | REACT_APP_VITE_CHILD_PUBLIC_PATH=http://localhost:8093 6 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/.env.development: -------------------------------------------------------------------------------- 1 | PUBLIC_URL=/ 2 | 3 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=http://localhost:8091/ 4 | 5 | REACT_APP_VITE_CHILD_PUBLIC_PATH=http://localhost:8093/ 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/.env.development: -------------------------------------------------------------------------------- 1 | PUBLIC_URL=/ 2 | 3 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=http://localhost:8091 4 | 5 | REACT_APP_VITE_CHILD_PUBLIC_PATH=http://localhost:8093/vite/ 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/micro-app-helper.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | eventCenterForViteApp: any 4 | eventCenterForViteAppKeepAlive: any 5 | } 6 | } 7 | 8 | export {} 9 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/public-path.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | if (window.__POWERED_BY_QIANKUN__) { 4 | __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ 5 | } 6 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare module "*.module.less" { 3 | const classes: { readonly [key: string]: string } 4 | export default classes 5 | } 6 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/qiankun-helper.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __POWERED_BY_QIANKUN__: boolean 4 | __INJECTED_PUBLIC_PATH_BY_QIANKUN__: string 5 | } 6 | } 7 | 8 | export {} 9 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare module "*.module.less" { 3 | const classes: { readonly [key: string]: string } 4 | export default classes 5 | } 6 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/qiankun-helper.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __POWERED_BY_QIANKUN__: boolean 4 | __INJECTED_PUBLIC_PATH_BY_QIANKUN__: string 5 | } 6 | } 7 | 8 | export {} 9 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/qiankun-helper.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __POWERED_BY_QIANKUN__: boolean 4 | __INJECTED_PUBLIC_PATH_BY_QIANKUN__: string 5 | } 6 | } 7 | 8 | export {} 9 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare module "*.module.less" { 3 | const classes: { readonly [key: string]: string } 4 | export default classes 5 | } 6 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/garfish-helper.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | __GARFISH__: boolean 4 | Garfish?: any 5 | __GARFISH_EXPORTS__?: any 6 | } 7 | } 8 | 9 | export {} 10 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=http://localhost:8091 4 | 5 | VITE_REACT18_CHILD_ENTRY=http://localhost:8092 6 | 7 | VITE_VITE_CHILD_ENTRY=http://localhost:8093 8 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare module "*.module.less" { 3 | const classes: { readonly [key: string]: string } 4 | export default classes 5 | } 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/public-path.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | // @ts-ignore 4 | if (window.__MICRO_APP_ENVIRONMENT__) { 5 | __webpack_public_path__ = window.__MICRO_APP_PUBLIC_PATH__ 6 | } 7 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare module "*.module.less" { 3 | const classes: { readonly [key: string]: string } 4 | export default classes 5 | } 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/public-path.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | // @ts-ignore 4 | if (window.__MICRO_APP_ENVIRONMENT__) { 5 | __webpack_public_path__ = window.__MICRO_APP_PUBLIC_PATH__ 6 | } 7 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/public-path.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | // @ts-ignore 4 | if (window.__MICRO_APP_ENVIRONMENT__) { 5 | __webpack_public_path__ = window.__MICRO_APP_PUBLIC_PATH__ 6 | } 7 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=http://localhost:8091 4 | 5 | VITE_REACT18_CHILD_ENTRY=http://localhost:8092 6 | 7 | VITE_VITE_CHILD_ENTRY=http://localhost:8093 8 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=http://localhost:8091/ 4 | 5 | VITE_REACT18_CHILD_ENTRY=http://localhost:8092/ 6 | 7 | VITE_VITE_CHILD_ENTRY=http://localhost:8093/ 8 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=http://localhost:8091 4 | 5 | VITE_REACT18_CHILD_ENTRY=http://localhost:8092 6 | 7 | VITE_VITE_CHILD_ENTRY=http://localhost:8093/vite/ 8 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/public-path.ts: -------------------------------------------------------------------------------- 1 | //* eslint-disable */ 2 | // @ts-nocheck 3 | // @ts-ignore 4 | if (window.__POWERED_BY_QIANKUN__) { 5 | __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ 6 | } 7 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/public-path.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | // @ts-ignore 4 | if (window.__POWERED_BY_QIANKUN__) { 5 | __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ 6 | } 7 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/utils/microAppLoading.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export let microAppLoading = ref(false) 4 | 5 | export function setMicroAppLoading(loading: boolean) { 6 | microAppLoading.value = loading 7 | } 8 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/utils/microAppLoading.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export let microAppLoading = ref(false) 4 | 5 | export function setMicroAppLoading(loading: boolean) { 6 | microAppLoading.value = loading 7 | } 8 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/utils/microAppLoading.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export let microAppLoading = ref(false) 4 | 5 | export function setMicroAppLoading(loading: boolean) { 6 | microAppLoading.value = loading 7 | } 8 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/.env.development: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/ 2 | 3 | VITE_VUE2_CHILD_PUBLIC_PATH=http://localhost:8091 4 | 5 | VITE_REACT18_CHILD_PUBLIC_PATH=http://localhost:8092 6 | 7 | VITE_VITE_CHILD_PUBLIC_PATH=http://localhost:8093 8 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/utils/microAppLoading.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export const microAppLoading = ref(false) 4 | 5 | export function setMicroAppLoading(loading: boolean) { 6 | microAppLoading.value = loading 7 | } 8 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/utils/microAppLoading.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue' 2 | 3 | export let microAppLoading = ref(false) 4 | 5 | export function setMicroAppLoading(loading: boolean) { 6 | microAppLoading.value = loading 7 | } 8 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/layout/Layout.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/layout/Layout.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/layout/Layout.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/layout/Layout.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/layout/Layout.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/views/CoexistView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/views/CoexistView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/views/CoexistView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/views/CoexistView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/views/CoexistView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/tsconfig.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/tsconfig.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/tsconfig.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/tsconfig.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/tsconfig.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.node.json", 3 | "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/.env.production: -------------------------------------------------------------------------------- 1 | BUILD_PATH=../../../micro-app-demos/icestark-demo/react-child 2 | 3 | PUBLIC_URL=/micro-app-demos/icestark-demo/react-child 4 | 5 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/icestark-demo/vue2-child 6 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/views/CssIsolation/index.module.less: -------------------------------------------------------------------------------- 1 | .first-col { 2 | color: #ffffff; 3 | background-color: purple; 4 | font-size: 20px; 5 | } 6 | 7 | .second-col { 8 | color: #ffffff; 9 | background-color: gray; 10 | font-size: 20px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/App.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/views/CssIsolation/index.module.less: -------------------------------------------------------------------------------- 1 | .first-col { 2 | color: #ffffff; 3 | background-color: purple; 4 | font-size: 20px; 5 | } 6 | 7 | .second-col { 8 | color: #ffffff; 9 | background-color: gray; 10 | font-size: 20px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/views/CssIsolation/index.module.less: -------------------------------------------------------------------------------- 1 | .first-col { 2 | color: #ffffff; 3 | background-color: purple; 4 | font-size: 20px; 5 | } 6 | 7 | .second-col { 8 | color: #ffffff; 9 | background-color: gray; 10 | font-size: 20px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/views/CssIsolation/index.module.less: -------------------------------------------------------------------------------- 1 | .first-col { 2 | color: #ffffff; 3 | background-color: purple; 4 | font-size: 20px; 5 | } 6 | 7 | .second-col { 8 | color: #ffffff; 9 | background-color: gray; 10 | font-size: 20px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/views/CssIsolation/index.module.less: -------------------------------------------------------------------------------- 1 | .first-col { 2 | color: #ffffff; 3 | background-color: purple; 4 | font-size: 20px; 5 | } 6 | 7 | .second-col { 8 | color: #ffffff; 9 | background-color: gray; 10 | font-size: 20px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/views/CssIsolation/index.module.less: -------------------------------------------------------------------------------- 1 | .first-col { 2 | color: #ffffff; 3 | background-color: brown; 4 | font-size: 16px; 5 | } 6 | 7 | .second-col { 8 | color: #ffffff; 9 | background-color: blueviolet; 10 | font-size: 16px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/views/CssIsolation/index.module.less: -------------------------------------------------------------------------------- 1 | .first-col { 2 | color: #ffffff; 3 | background-color: brown; 4 | font-size: 16px; 5 | } 6 | 7 | .second-col { 8 | color: #ffffff; 9 | background-color: blueviolet; 10 | font-size: 16px; 11 | } 12 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | plugins: [ 4 | [ 5 | 'import', 6 | { 7 | libraryName: 'ant-design-vue', 8 | style: true, 9 | }, 10 | ], 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | plugins: [ 4 | [ 5 | 'import', 6 | { 7 | libraryName: 'ant-design-vue', 8 | style: true, 9 | }, 10 | ], 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | plugins: [ 4 | [ 5 | 'import', 6 | { 7 | libraryName: 'ant-design-vue', 8 | style: true, 9 | }, 10 | ], 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | plugins: [ 4 | [ 5 | 'import', 6 | { 7 | libraryName: 'ant-design-vue', 8 | style: true, 9 | }, 10 | ], 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/cli-plugin-babel/preset'], 3 | plugins: [ 4 | [ 5 | 'import', 6 | { 7 | libraryName: 'ant-design-vue', 8 | style: true, 9 | }, 10 | ], 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/data/userData.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | name: string 3 | gender: string 4 | age: number 5 | phone: string 6 | } 7 | 8 | export const user: User = { 9 | name: 'MAXLZ', 10 | gender: 'male', 11 | age: 12, 12 | phone: '11111111111111' 13 | } 14 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/data/userData.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | name: string 3 | gender: string 4 | age: number 5 | phone: string 6 | } 7 | 8 | export const user: User = { 9 | name: 'MAXLZ', 10 | gender: 'male', 11 | age: 12, 12 | phone: '11111111111111' 13 | } 14 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/data/userData.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | name: string 3 | gender: string 4 | age: number 5 | phone: string 6 | } 7 | 8 | export const user: User = { 9 | name: 'MAXLZ', 10 | gender: 'male', 11 | age: 12, 12 | phone: '11111111111111' 13 | } 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/data/userData.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | name: string 3 | gender: string 4 | age: number 5 | phone: string 6 | } 7 | 8 | export const user: User = { 9 | name: 'MAXLZ', 10 | gender: 'male', 11 | age: 12, 12 | phone: '11111111111111' 13 | } 14 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/data/userData.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | name: string 3 | gender: string 4 | age: number 5 | phone: string 6 | } 7 | 8 | export const user: User = { 9 | name: 'MAXLZ', 10 | gender: 'male', 11 | age: 12, 12 | phone: '11111111111111' 13 | } 14 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/components/Counter/index.module.less: -------------------------------------------------------------------------------- 1 | .box { 2 | width: 100%; 3 | 4 | label { 5 | font-size: 20px; 6 | } 7 | 8 | :global { 9 | .number { 10 | font-weight: normal; 11 | font-size: 50px; 12 | margin: 0; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/views/KeepAliveView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/micro-app-helper.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window extends Record { 3 | microApp: any 4 | eventCenterForViteApp: any 5 | __MICRO_APP_PUBLIC_PATH__: string 6 | __MICRO_APP_BASE_APPLICATION__: boolean 7 | } 8 | } 9 | 10 | export {} 11 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | interface Element extends VNode {} 6 | interface ElementClass extends Vue {} 7 | interface IntrinsicElements { 8 | [elem: string]: any 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | interface Element extends VNode {} 6 | interface ElementClass extends Vue {} 7 | interface IntrinsicElements { 8 | [elem: string]: any 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | interface Element extends VNode {} 6 | interface ElementClass extends Vue {} 7 | interface IntrinsicElements { 8 | [elem: string]: any 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | interface Element extends VNode {} 6 | interface ElementClass extends Vue {} 7 | interface IntrinsicElements { 8 | [elem: string]: any 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/shims-tsx.d.ts: -------------------------------------------------------------------------------- 1 | import Vue, { VNode } from 'vue' 2 | 3 | declare global { 4 | namespace JSX { 5 | interface Element extends VNode {} 6 | interface ElementClass extends Vue {} 7 | interface IntrinsicElements { 8 | [elem: string]: any 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/stores/storeHooks.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | import type { RootState, AppDispatch } from './store' 3 | 4 | export const useAppDispatch: () => AppDispatch = useDispatch 5 | export const useAppSelector: TypedUseSelectorHook = useSelector 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | dist 3 | # Build dir 4 | micro-app-demos 5 | node_modules 6 | .history 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | .fleet 18 | *.suo 19 | *.ntvs* 20 | *.njsproj 21 | *.sln 22 | *.sw? 23 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/.env.production: -------------------------------------------------------------------------------- 1 | BUILD_PATH=../../../micro-app-demos/wujie-demo/react-child 2 | 3 | PUBLIC_URL=/micro-app-demos/wujie-demo/react-child 4 | 5 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/wujie-demo/vue2-child/ 6 | 7 | REACT_APP_VITE_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/wujie-demo/vite-child/ 8 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/.env.production: -------------------------------------------------------------------------------- 1 | BUILD_PATH=../../../micro-app-demos/garfish-demo/react-child 2 | 3 | PUBLIC_URL=/micro-app-demos/garfish-demo/react-child 4 | 5 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/garfish-demo/vue2-child 6 | 7 | REACT_APP_VITE_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/garfish-demo/vite-child 8 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/.env.production: -------------------------------------------------------------------------------- 1 | BUILD_PATH=../../../micro-app-demos/qiankun-demo/react-child 2 | 3 | PUBLIC_URL=/micro-app-demos/qiankun-demo/react-child 4 | 5 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/qiankun-demo/vue2-child/ 6 | 7 | REACT_APP_VITE_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/qiankun-demo/vite-child/ 8 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/wujie-demo/vue3-main/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/wujie-demo/vue2-child/ 4 | 5 | VITE_REACT18_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/wujie-demo/react-child/ 6 | 7 | VITE_VITE_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/wujie-demo/vite-child/ 8 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/stores/app.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { apps as microApps } from '@/data/appData' 3 | import { reactive } from 'vue' 4 | import type { AppConfig } from '@ice/stark/lib/apps' 5 | 6 | export const useAppStore = defineStore('appStore', () => { 7 | const apps = reactive(microApps) 8 | return { apps } 9 | }) 10 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/garfish-demo/vue3-main/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/garfish-demo/vue2-child/ 4 | 5 | VITE_REACT18_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/garfish-demo/react-child/ 6 | 7 | VITE_VITE_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/garfish-demo/vite-child/ 8 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["./src/*"] 8 | } 9 | }, 10 | 11 | "references": [ 12 | { 13 | "path": "./tsconfig.config.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["./src/*"] 8 | } 9 | }, 10 | 11 | "references": [ 12 | { 13 | "path": "./tsconfig.config.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/.env.production: -------------------------------------------------------------------------------- 1 | BUILD_PATH=../../../micro-app-demos/micro-app-demo/react-child 2 | 3 | PUBLIC_URL=/micro-app-demos/micro-app-demo/react-child 4 | 5 | REACT_APP_VUE2_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/micro-app-demo/vue2-child/ 6 | 7 | REACT_APP_VITE_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/micro-app-demo/vite-child/ 8 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/micro-app-helper.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window extends Record { 3 | microApp: any 4 | mount: any 5 | unmount: any 6 | __MICRO_APP_ENVIRONMENT__: boolean 7 | __MICRO_APP_PUBLIC_PATH__: string 8 | __MICRO_APP_BASE_ROUTE__: string 9 | __MICRO_APP_NAME__: string 10 | } 11 | } 12 | 13 | export {} 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/micro-app-helper.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window extends Record { 3 | microApp: any 4 | unmount: any 5 | mount: any 6 | __MICRO_APP_ENVIRONMENT__: boolean 7 | __MICRO_APP_PUBLIC_PATH__: string 8 | __MICRO_APP_BASE_ROUTE__: string 9 | __MICRO_APP_NAME__: string 10 | } 11 | } 12 | 13 | export {} 14 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/qiankun-demo/vue3-main/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/qiankun-demo/vue2-child/ 4 | 5 | VITE_REACT18_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/qiankun-demo/react-child/ 6 | 7 | VITE_VITE_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/qiankun-demo/vite-child/ 8 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["./src/*"] 8 | } 9 | }, 10 | 11 | "references": [ 12 | { 13 | "path": "./tsconfig.config.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["./src/*"] 8 | } 9 | }, 10 | 11 | "references": [ 12 | { 13 | "path": "./tsconfig.config.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/micro-app-demo/vue3-main/ 2 | 3 | VITE_VUE2_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/micro-app-demo/vue2-child/ 4 | 5 | VITE_REACT18_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/micro-app-demo/react-child/ 6 | 7 | VITE_VITE_CHILD_ENTRY=https://maxlz1.github.io/micro-app-demos/micro-app-demo/vite-child/ 8 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/utils/preloadApp.ts: -------------------------------------------------------------------------------- 1 | import { useAppStore } from '@/stores/app' 2 | import Garfish from 'garfish' 3 | 4 | export default function preloadApp() { 5 | const { apps } = useAppStore() 6 | 7 | apps.forEach((item) => { 8 | Garfish.registerApp({ 9 | name: item.name, 10 | entry: item.entry 11 | }) 12 | Garfish.preloadApp(item.name) 13 | }) 14 | } -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE_URL=/micro-app-demos/icestark-demo/vue3-main/ 2 | 3 | VITE_VUE2_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/icestark-demo/vue2-child 4 | 5 | VITE_REACT18_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/icestark-demo/react-child 6 | 7 | VITE_VITE_CHILD_PUBLIC_PATH=https://maxlz1.github.io/micro-app-demos/icestark-demo/vite-child 8 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript', 10 | '@vue/eslint-config-prettier' 11 | ], 12 | parserOptions: { 13 | ecmaVersion: 'latest' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | extends: [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript', 10 | '@vue/eslint-config-prettier' 11 | ], 12 | parserOptions: { 13 | ecmaVersion: 'latest' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref, toRaw } from 'vue' 3 | import type { User } from '@/data/userData' 4 | 5 | export const useUserStore = defineStore('userStore', () => { 6 | const user = ref(null) 7 | 8 | const setUser = (userParam: User) => { 9 | user.value = userParam 10 | } 11 | 12 | return { user, setUser } 13 | }) 14 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript', 10 | '@vue/eslint-config-prettier' 11 | ], 12 | parserOptions: { 13 | ecmaVersion: 'latest' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript', 10 | '@vue/eslint-config-prettier' 11 | ], 12 | parserOptions: { 13 | ecmaVersion: 'latest' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | /* eslint-env node */ 2 | require('@rushstack/eslint-patch/modern-module-resolution') 3 | 4 | module.exports = { 5 | root: true, 6 | 'extends': [ 7 | 'plugin:vue/vue3-essential', 8 | 'eslint:recommended', 9 | '@vue/eslint-config-typescript', 10 | '@vue/eslint-config-prettier' 11 | ], 12 | parserOptions: { 13 | ecmaVersion: 'latest' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/main.ts: -------------------------------------------------------------------------------- 1 | import '@/styles/index.less' 2 | import { createApp } from 'vue' 3 | import { createPinia } from 'pinia' 4 | import App from './App.vue' 5 | import router from './router' 6 | import { listenReceiveMessage } from '@/utils/messageListener' 7 | 8 | const app = createApp(App) 9 | 10 | app.use(createPinia()) 11 | app.use(router) 12 | 13 | app.mount('#app') 14 | 15 | listenReceiveMessage() 16 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | wujie demo 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | garfish demo 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | MicroApp demo 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.web.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "types": [ 7 | "node" 8 | ], 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | } 12 | }, 13 | 14 | "references": [ 15 | { 16 | "path": "./tsconfig.config.json" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | qiankun demo 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/wujie-helper.d.ts: -------------------------------------------------------------------------------- 1 | import type { User } from '@/stores/user' 2 | 3 | declare global { 4 | interface Window { 5 | $wujie: { 6 | bus: { 7 | $on: any 8 | $emit: any 9 | } 10 | props: { 11 | router: any 12 | } 13 | } 14 | __POWERED_BY_WUJIE__: boolean 15 | __WUJIE_MOUNT: any 16 | __WUJIE_UNMOUNT: any 17 | } 18 | } 19 | 20 | export {} 21 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | icestark demo 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/utils/dispatchUserEvent.ts: -------------------------------------------------------------------------------- 1 | import type { User } from '@/data/userData' 2 | 3 | export const CHANGE_USER = 'changeUser' 4 | 5 | function createUserEvent(user: User | null) { 6 | return new CustomEvent(CHANGE_USER, { 7 | detail: user 8 | }) 9 | } 10 | 11 | export function dispatchUserEvent(user: User | null) { 12 | const event = createUserEvent(user) 13 | window.dispatchEvent(event) 14 | } 15 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/stores/counter.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export const useCounterStore = defineStore('counter', () => { 5 | const value = ref(0) 6 | 7 | const increment = (step: number) => { 8 | value.value += step 9 | } 10 | 11 | const decrement = (step: number) => { 12 | value.value -= step 13 | } 14 | 15 | return { value, decrement, increment } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/stores/app.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { apps as microApps } from '@/data/appData' 3 | import { computed, reactive } from 'vue' 4 | import type { MicroApp } from '@/data/appData' 5 | 6 | export const useAppStore = defineStore('appStore', () => { 7 | const apps = reactive(microApps) 8 | const paths = computed(() => apps.map((item) => item.activeWhen)) 9 | return { apps, paths } 10 | }) 11 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/stores/store.ts: -------------------------------------------------------------------------------- 1 | import { configureStore } from '@reduxjs/toolkit' 2 | import userReducer from './userSlice' 3 | import counterReducer from '@/stores/counterSlice' 4 | 5 | export const store = configureStore({ 6 | reducer: { 7 | user: userReducer, 8 | counter: counterReducer 9 | } 10 | }) 11 | 12 | export type RootState = ReturnType 13 | export type AppDispatch = typeof store.dispatch 14 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/wujie-helper.d.ts: -------------------------------------------------------------------------------- 1 | import type { User } from '@/stores/user' 2 | 3 | declare global { 4 | interface Window { 5 | $wujie: { 6 | bus: { 7 | $on: any 8 | $emit: any 9 | $off: any 10 | } 11 | props: { 12 | router: any 13 | } 14 | } 15 | __POWERED_BY_WUJIE__: boolean 16 | __WUJIE_MOUNT: any 17 | __WUJIE_UNMOUNT: any 18 | } 19 | } 20 | 21 | export {} 22 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/stores/app.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { apps as microApps } from '@/data/appData' 3 | import { computed, reactive } from 'vue' 4 | import type { MicroApp } from '@/data/appData' 5 | 6 | export const useAppStore = defineStore('appStore', () => { 7 | const apps = reactive(microApps) 8 | const paths = computed(() => apps.map(item => item.activeRule)) 9 | return { apps, paths } 10 | }) 11 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/types/microAppDataListenerTypes.ts: -------------------------------------------------------------------------------- 1 | export enum EventTypes { 2 | message = 'message' 3 | } 4 | 5 | export enum MessageTypes { 6 | success = 'success', 7 | warn = 'warn', 8 | error = 'error', 9 | info = 'info' 10 | } 11 | 12 | export interface MessageData { 13 | info: string 14 | type: MessageTypes 15 | from: string 16 | } 17 | 18 | export interface DataListenerParam { 19 | type: EventTypes 20 | data: T 21 | } 22 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | export const useUserStore = defineStore('user', () => { 12 | const user = ref(null) 13 | 14 | const setUser = (userData: User) => { 15 | user.value = userData 16 | } 17 | 18 | return { user, setUser } 19 | }) 20 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | export const useUserStore = defineStore('user', () => { 12 | const user = ref(null) 13 | 14 | const setUser = (userData: User) => { 15 | user.value = userData 16 | } 17 | 18 | return { user, setUser } 19 | }) 20 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | export const useUserStore = defineStore('user', () => { 12 | const user = ref(null) 13 | 14 | const setUser = (userData: User) => { 15 | user.value = userData 16 | } 17 | 18 | return { user, setUser } 19 | }) 20 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | export const useUserStore = defineStore('user', () => { 12 | const user = ref(null) 13 | 14 | const setUser = (userData: User) => { 15 | user.value = userData 16 | } 17 | 18 | return { user, setUser } 19 | }) 20 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref } from 'vue' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | export const useUserStore = defineStore('user', () => { 12 | const user = ref(null) 13 | 14 | const setUser = (userData: User) => { 15 | user.value = userData 16 | } 17 | 18 | return { user, setUser } 19 | }) 20 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/wujie-helper.d.ts: -------------------------------------------------------------------------------- 1 | import type { User } from '@/stores/user' 2 | 3 | declare global { 4 | interface Window { 5 | $wujie: { 6 | bus: { 7 | $on: any 8 | $emit: any 9 | $off: any 10 | } 11 | props: { 12 | router: any 13 | } 14 | } 15 | __POWERED_BY_WUJIE__: boolean 16 | __WUJIE_MOUNT: any 17 | __WUJIE_UNMOUNT: any 18 | __WUJIE: any 19 | } 20 | } 21 | 22 | export {} 23 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref, toRaw } from 'vue' 3 | import type { User } from '@/data/userData' 4 | 5 | export const useUserStore = defineStore('userStore', () => { 6 | const user = ref(null) 7 | 8 | const setUser = (userParam: User) => { 9 | user.value = userParam 10 | window.Garfish.channel.emit('userInfo', toRaw(user.value)) 11 | } 12 | 13 | return { user, setUser } 14 | }) 15 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/main.ts: -------------------------------------------------------------------------------- 1 | import '@/styles/index.less' 2 | import { createApp } from 'vue' 3 | import { createPinia } from 'pinia' 4 | import App from './App.vue' 5 | import router from './router' 6 | import { listenReceiveMessage } from '@/utils/messageListener' 7 | import { setupApp } from '@/utils/setupApp' 8 | 9 | const app = createApp(App) 10 | 11 | app.use(createPinia()) 12 | app.use(router) 13 | 14 | app.mount('#app') 15 | 16 | listenReceiveMessage() 17 | setupApp() 18 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/main.ts: -------------------------------------------------------------------------------- 1 | import '@/styles/index.less' 2 | import { createApp, toRaw } from 'vue' 3 | import { createPinia } from 'pinia' 4 | import App from '@/App.vue' 5 | import router from '@/router' 6 | import { listenReceiveMessage } from '@/utils/messageListener' 7 | import preloadApp from '@/utils/preloadApp' 8 | 9 | const app = createApp(App) 10 | 11 | app.use(createPinia()) 12 | app.use(router) 13 | 14 | app.mount('#app') 15 | 16 | listenReceiveMessage() 17 | 18 | preloadApp() -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref, toRaw } from 'vue' 3 | import type { User } from '@/data/userData' 4 | import store from '@ice/stark-data/lib/store' 5 | 6 | export const useUserStore = defineStore('userStore', () => { 7 | const user = ref(null) 8 | 9 | const setUser = (userParam: User) => { 10 | user.value = userParam 11 | store.set('user', toRaw(user.value)) 12 | } 13 | 14 | return { user, setUser } 15 | }) 16 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref, toRaw } from 'vue' 3 | import type { User } from '@/data/userData' 4 | import { dispatchUserEvent } from '@/utils/dispatchUserEvent' 5 | 6 | export const useUserStore = defineStore('userStore', () => { 7 | const user = ref(null) 8 | 9 | const setUser = (userParam: User) => { 10 | user.value = userParam 11 | dispatchUserEvent(toRaw(user.value)) 12 | } 13 | 14 | return { user, setUser } 15 | }) 16 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/reportWebVitals.ts: -------------------------------------------------------------------------------- 1 | import { ReportHandler } from 'web-vitals'; 2 | 3 | const reportWebVitals = (onPerfEntry?: ReportHandler) => { 4 | if (onPerfEntry && onPerfEntry instanceof Function) { 5 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 6 | getCLS(onPerfEntry); 7 | getFID(onPerfEntry); 8 | getFCP(onPerfEntry); 9 | getLCP(onPerfEntry); 10 | getTTFB(onPerfEntry); 11 | }); 12 | } 13 | }; 14 | 15 | export default reportWebVitals; 16 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/main.ts: -------------------------------------------------------------------------------- 1 | import '@/styles/index.less' 2 | import { createApp } from 'vue' 3 | import { createPinia } from 'pinia' 4 | import App from './App.vue' 5 | import router from './router' 6 | import { listenReceiveMessage } from '@/utils/messageListener' 7 | import store from '@ice/stark-data/lib/store' 8 | 9 | const app = createApp(App) 10 | 11 | app.use(createPinia()) 12 | app.use(router) 13 | 14 | app.mount('#main-app') 15 | 16 | listenReceiveMessage() 17 | 18 | // 下发路由对象 19 | store.set('router', router) 20 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/stores/app.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { apps as microApps } from '@/data/appData' 3 | import { reactive } from 'vue' 4 | import type { MicroApp } from '@/data/appData' 5 | 6 | export const useAppStore = defineStore('appStore', () => { 7 | const apps = reactive(microApps) 8 | 9 | // 获取被激活的应用 10 | const getActiveMicroApp = function(path: string) { 11 | return apps.find(item => path.startsWith(item.baseroute)) 12 | } 13 | 14 | return { apps, getActiveMicroApp } 15 | }) 16 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/stores/user.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { ref, toRaw } from 'vue' 3 | import type { User } from '@/data/userData' 4 | import WujieVue from 'wujie-vue3' 5 | 6 | const { bus } = WujieVue 7 | 8 | export const useUserStore = defineStore('userStore', () => { 9 | const user = ref(null) 10 | 11 | const setUser = (userParam: User) => { 12 | user.value = userParam 13 | bus.$emit('changeUser', { 14 | user: toRaw(user.value) 15 | }) 16 | } 17 | 18 | return { user, setUser } 19 | }) 20 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/stores/app.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia' 2 | import { apps as microApps } from '@/data/appData' 3 | import { computed, reactive } from 'vue' 4 | import type { MicroApp } from '@/data/appData' 5 | import { prefetchApps } from 'qiankun' 6 | 7 | export const useAppStore = defineStore('appStore', () => { 8 | const apps = reactive(microApps) 9 | // 预加载 10 | prefetchApps(microApps.map(item => ({ 11 | name: item.name, 12 | entry: item.entry 13 | }))) 14 | const paths = computed(() => apps.map(item => item.activeRule)) 15 | return { apps, paths } 16 | }) 17 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/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 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/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 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/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 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/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 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/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 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service') 2 | const { name } = require('./package') 3 | const path = require('path') 4 | 5 | module.exports = defineConfig({ 6 | outputDir: path.join(__dirname, '../../../micro-app-demos/wujie-demo/vue2-child'), 7 | publicPath: process.env.VUE_APP_PUBLIC_PATH, 8 | devServer: { 9 | port: 8091, 10 | headers: { 11 | 'Access-Control-Allow-Origin': '*', 12 | }, 13 | }, 14 | transpileDependencies: true, 15 | css: { 16 | loaderOptions: { 17 | less: { 18 | lessOptions: { 19 | javascriptEnabled: true, 20 | }, 21 | }, 22 | }, 23 | }, 24 | }) 25 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/views/CssIsolation/index.tsx: -------------------------------------------------------------------------------- 1 | import { Col, Row, Typography } from 'antd' 2 | import styles from './index.module.less' 3 | 4 | export default function CssIsolation() { 5 | return ( 6 | <> 7 | 8 | 9 | react18子应用(CSS Module) 10 | 11 | 12 | 13 | class="first-col"
background-color: purple;
font-size: 20px; 14 | class="second-col"
background-color: gray;
font-size: 20px; 15 |
16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/views/CssIsolation/index.tsx: -------------------------------------------------------------------------------- 1 | import { Col, Row, Typography } from 'antd' 2 | import styles from './index.module.less' 3 | 4 | export default function CssIsolation() { 5 | return ( 6 | <> 7 | 8 | 9 | vite子应用(CSS Module) 10 | 11 | 12 | 13 | class="first-col"
background-color: brown;
font-size: 16px; 14 | class="second-col"
background-color: blueviolet;
font-size: 16px; 15 |
16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/views/CssIsolation/index.tsx: -------------------------------------------------------------------------------- 1 | import { Col, Row, Typography } from 'antd' 2 | import styles from './index.module.less' 3 | 4 | export default function CssIsolation() { 5 | return ( 6 | <> 7 | 8 | 9 | react18子应用(CSS Module) 10 | 11 | 12 | 13 | class="first-col"
background-color: purple;
font-size: 20px; 14 | class="second-col"
background-color: gray;
font-size: 20px; 15 |
16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/views/CssIsolation/index.tsx: -------------------------------------------------------------------------------- 1 | import { Col, Row, Typography } from 'antd' 2 | import styles from './index.module.less' 3 | 4 | export default function CssIsolation() { 5 | return ( 6 | <> 7 | 8 | 9 | react18子应用(CSS Module) 10 | 11 | 12 | 13 | class="first-col"
background-color: purple;
font-size: 20px; 14 | class="second-col"
background-color: gray;
font-size: 20px; 15 |
16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/views/CssIsolation/index.tsx: -------------------------------------------------------------------------------- 1 | import { Col, Row, Typography } from 'antd' 2 | import styles from './index.module.less' 3 | 4 | export default function CssIsolation() { 5 | return ( 6 | <> 7 | 8 | 9 | react18子应用(CSS Module) 10 | 11 | 12 | 13 | class="first-col"
background-color: purple;
font-size: 20px; 14 | class="second-col"
background-color: gray;
font-size: 20px; 15 |
16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/views/CssIsolation/index.tsx: -------------------------------------------------------------------------------- 1 | import { Col, Row, Typography } from 'antd' 2 | import styles from './index.module.less' 3 | 4 | export default function CssIsolation() { 5 | return ( 6 | <> 7 | 8 | 9 | react18子应用(CSS Module) 10 | 11 | 12 | 13 | class="first-col"
background-color: purple;
font-size: 20px; 14 | class="second-col"
background-color: gray;
font-size: 20px; 15 |
16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/views/CssIsolation/index.tsx: -------------------------------------------------------------------------------- 1 | import { Col, Row, Typography } from 'antd' 2 | import styles from './index.module.less' 3 | 4 | export default function CssIsolation() { 5 | return ( 6 | <> 7 | 8 | 9 | vite子应用(CSS Module) 10 | 11 | 12 | 13 | class="first-col"
background-color: brown;
font-size: 16px; 14 | class="second-col"
background-color: blueviolet;
font-size: 16px; 15 |
16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/views/TabView/index.tsx: -------------------------------------------------------------------------------- 1 | import Counter from '@/components/Counter' 2 | import MessageTrigger from '@/components/MessageTrigger' 3 | import { Input, Tabs } from 'antd' 4 | 5 | const items = [ 6 | { 7 | label: 'input', 8 | key: '1', 9 | children: ( 10 | 11 | ) 12 | }, 13 | { 14 | label: 'message trigger', 15 | key: '2', 16 | children: ( 17 | 18 | ) 19 | }, 20 | { 21 | label: 'counter', 22 | key: '3', 23 | children: ( 24 | 25 | ) 26 | } 27 | ] 28 | 29 | export default function TabView() { 30 | return ( 31 | 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/data/appData.ts: -------------------------------------------------------------------------------- 1 | export interface MicroApp { 2 | name: string 3 | url: string 4 | baseroute: string 5 | } 6 | 7 | export const vue2AppEntry = import.meta.env.VITE_VUE2_CHILD_ENTRY 8 | export const reactAppEntry = import.meta.env.VITE_REACT18_CHILD_ENTRY 9 | export const viteAppEntry = import.meta.env.VITE_VITE_CHILD_ENTRY 10 | 11 | export const apps = [ 12 | { 13 | name: 'vue2App', 14 | url: vue2AppEntry, 15 | baseroute: '/vue2App' 16 | }, 17 | { 18 | name: 'reactApp', 19 | url: reactAppEntry, 20 | baseroute: '/reactApp' 21 | }, 22 | { 23 | name: 'viteApp', 24 | url: viteAppEntry, 25 | baseroute: '/viteApp' 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/data/appData.ts: -------------------------------------------------------------------------------- 1 | export interface MicroApp { 2 | name: string 3 | url: string 4 | activeRule: string 5 | } 6 | 7 | export const vue2AppEntry = import.meta.env.VITE_VUE2_CHILD_ENTRY 8 | export const reactAppEntry = import.meta.env.VITE_REACT18_CHILD_ENTRY 9 | export const viteAppEntry = import.meta.env.VITE_VITE_CHILD_ENTRY 10 | 11 | export const apps = [ 12 | { 13 | name: 'vue2App', 14 | url: vue2AppEntry, 15 | activeRule: '/vue2App' 16 | }, 17 | { 18 | name: 'reactApp', 19 | url: reactAppEntry, 20 | activeRule: '/reactApp' 21 | }, 22 | { 23 | name: 'viteApp', 24 | url: viteAppEntry, 25 | activeRule: '/viteApp' 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/data/appData.ts: -------------------------------------------------------------------------------- 1 | export interface MicroApp { 2 | name: string 3 | entry: string 4 | activeWhen: string 5 | } 6 | 7 | export const vue2AppEntry = import.meta.env.VITE_VUE2_CHILD_ENTRY 8 | export const reactAppEntry = import.meta.env.VITE_REACT18_CHILD_ENTRY 9 | export const viteAppEntry = import.meta.env.VITE_VITE_CHILD_ENTRY 10 | 11 | export const apps = [ 12 | { 13 | name: 'vue2App', 14 | entry: vue2AppEntry, 15 | activeWhen: '/vue2App' 16 | }, 17 | { 18 | name: 'reactApp', 19 | entry: reactAppEntry, 20 | activeWhen: '/reactApp' 21 | }, 22 | { 23 | name: 'viteApp', 24 | entry: viteAppEntry, 25 | activeWhen: '/viteApp' 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/reset.css: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue3-main/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin:0; 3 | padding:0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/styles/reset.less: -------------------------------------------------------------------------------- 1 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td { 2 | margin: 0; 3 | padding: 0; 4 | } 5 | address, cite, dfn, em, var { 6 | font-style:normal; 7 | } 8 | small { 9 | font-size:12px; 10 | } 11 | ul, ol { 12 | list-style:none; 13 | } 14 | a { 15 | text-decoration:none; 16 | } 17 | a:hover { 18 | text-decoration:underline; 19 | } 20 | sup { 21 | vertical-align:text-top; 22 | } 23 | sub{ 24 | vertical-align:text-bottom; 25 | } 26 | legend { 27 | color:#000; 28 | } 29 | fieldset, img { 30 | border:0; 31 | } 32 | button, input, select, textarea { 33 | font-size:100%; 34 | } 35 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/stores/userSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | export interface User { 5 | name: string 6 | age: number 7 | gender: string 8 | phone: string 9 | } 10 | 11 | interface UserState { 12 | user: User | null 13 | } 14 | 15 | const initialState: UserState = { 16 | user: null 17 | } 18 | 19 | export const userSlice = createSlice({ 20 | name: 'user', 21 | initialState, 22 | reducers: { 23 | setUser: (state, action: PayloadAction) => { 24 | state.user = action.payload 25 | } 26 | } 27 | }) 28 | 29 | export const { setUser } = userSlice.actions 30 | 31 | export default userSlice.reducer 32 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | "allowJs": true, 13 | "skipLibCheck": true, 14 | "esModuleInterop": true, 15 | "allowSyntheticDefaultImports": true, 16 | "strict": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "noFallthroughCasesInSwitch": true, 19 | "module": "esnext", 20 | "moduleResolution": "node", 21 | "resolveJsonModule": true, 22 | "isolatedModules": true, 23 | "noEmit": true, 24 | "jsx": "react-jsx" 25 | }, 26 | "include": [ 27 | "src" 28 | ], 29 | } 30 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | "allowJs": true, 13 | "skipLibCheck": true, 14 | "esModuleInterop": true, 15 | "allowSyntheticDefaultImports": true, 16 | "strict": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "noFallthroughCasesInSwitch": true, 19 | "module": "esnext", 20 | "moduleResolution": "node", 21 | "resolveJsonModule": true, 22 | "isolatedModules": true, 23 | "noEmit": true, 24 | "jsx": "react-jsx" 25 | }, 26 | "include": [ 27 | "src" 28 | ], 29 | } 30 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | "allowJs": true, 13 | "skipLibCheck": true, 14 | "esModuleInterop": true, 15 | "allowSyntheticDefaultImports": true, 16 | "strict": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "noFallthroughCasesInSwitch": true, 19 | "module": "esnext", 20 | "moduleResolution": "node", 21 | "resolveJsonModule": true, 22 | "isolatedModules": true, 23 | "noEmit": true, 24 | "jsx": "react-jsx" 25 | }, 26 | "include": [ 27 | "src" 28 | ], 29 | } 30 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | "allowJs": true, 13 | "skipLibCheck": true, 14 | "esModuleInterop": true, 15 | "allowSyntheticDefaultImports": true, 16 | "strict": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "noFallthroughCasesInSwitch": true, 19 | "module": "esnext", 20 | "moduleResolution": "node", 21 | "resolveJsonModule": true, 22 | "isolatedModules": true, 23 | "noEmit": true, 24 | "jsx": "react-jsx" 25 | }, 26 | "include": [ 27 | "src" 28 | ], 29 | } 30 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/utils/dispatchReceiveMessageEvent.ts: -------------------------------------------------------------------------------- 1 | export const RECEIVE_MESSAGE = 'receiveMessage' 2 | 3 | export enum Types { 4 | success = 'success', 5 | warn = 'warn', 6 | error = 'error', 7 | info = 'info', 8 | } 9 | 10 | export interface Message { 11 | info: string 12 | type: Types 13 | from: string 14 | } 15 | 16 | function createReceiveMessageEvent(message: Omit) { 17 | return new CustomEvent(RECEIVE_MESSAGE, { 18 | detail: { 19 | ...message, 20 | from: 'Vite子应用', 21 | }, 22 | }) 23 | } 24 | 25 | export function dispatchReceiveMessageEvent(message: Omit) { 26 | const event = createReceiveMessageEvent(message) 27 | window.dispatchEvent(event) 28 | } 29 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/utils/dispatchReceiveMessageEvent.ts: -------------------------------------------------------------------------------- 1 | export const RECEIVE_MESSAGE = 'receiveMessage' 2 | 3 | export enum Types { 4 | success = 'success', 5 | warn = 'warn', 6 | error = 'error', 7 | info = 'info', 8 | } 9 | 10 | export interface Message { 11 | info: string 12 | type: Types 13 | from: string 14 | } 15 | 16 | function createReceiveMessageEvent(message: Omit) { 17 | return new CustomEvent(RECEIVE_MESSAGE, { 18 | detail: { 19 | ...message, 20 | from: 'Vue2子应用', 21 | }, 22 | }) 23 | } 24 | 25 | export function dispatchReceiveMessageEvent(message: Omit) { 26 | const event = createReceiveMessageEvent(message) 27 | window.dispatchEvent(event) 28 | } 29 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/utils/dispatchReceiveMessageEvent.ts: -------------------------------------------------------------------------------- 1 | export const RECEIVE_MESSAGE = 'receiveMessage' 2 | 3 | export enum Types { 4 | success = 'success', 5 | warn = 'warn', 6 | error = 'error', 7 | info = 'info', 8 | } 9 | 10 | export interface Message { 11 | info: string 12 | type: Types 13 | from: string 14 | } 15 | 16 | function createReceiveMessageEvent(message: Omit) { 17 | return new CustomEvent(RECEIVE_MESSAGE, { 18 | detail: { 19 | ...message, 20 | from: 'React18子应用', 21 | }, 22 | }) 23 | } 24 | 25 | export function dispatchReceiveMessageEvent(message: Omit) { 26 | const event = createReceiveMessageEvent(message) 27 | window.dispatchEvent(event) 28 | } 29 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": true, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx", 18 | "baseUrl": ".", 19 | "paths": { 20 | "@/*": ["./src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/icestark-demo/react-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/src/stores/counterSlice.ts: -------------------------------------------------------------------------------- 1 | import { createSlice } from '@reduxjs/toolkit' 2 | import type { PayloadAction } from '@reduxjs/toolkit' 3 | 4 | interface CounterState { 5 | value: number 6 | } 7 | 8 | const initialState: CounterState = { 9 | value: 0 10 | } 11 | 12 | export const counterSlice = createSlice({ 13 | name: 'counter', 14 | initialState, 15 | reducers: { 16 | increment: (state, action: PayloadAction) => { 17 | state.value += action.payload 18 | }, 19 | decrement: (state, action: PayloadAction) => { 20 | state.value -= action.payload 21 | } 22 | } 23 | }) 24 | 25 | export const { increment, decrement } = counterSlice.actions 26 | 27 | export default counterSlice.reducer 28 | -------------------------------------------------------------------------------- /packages/qiankun-demo/react-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": true, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx", 18 | "baseUrl": ".", 19 | "paths": { 20 | "@/*": ["./src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /packages/wujie-demo/react-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": true, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx", 18 | "baseUrl": ".", 19 | "paths": { 20 | "@/*": ["./src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /packages/icestark-demo/vite-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": true, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx", 18 | "baseUrl": ".", 19 | "paths": { 20 | "@/*": ["./src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/utils/messageListener.ts: -------------------------------------------------------------------------------- 1 | import { notification } from 'ant-design-vue' 2 | import 'ant-design-vue/es/notification/style/css' 3 | import event from '@ice/stark-data/lib/event' 4 | 5 | export enum Types { 6 | success = 'success', 7 | warn = 'warn', 8 | error = 'error', 9 | info = 'info' 10 | } 11 | 12 | export interface Message { 13 | info: string 14 | type: Types 15 | from: string 16 | } 17 | 18 | // 监听receiveMessage 19 | // 子应用触发type=receiveMessage的CustomEvent 20 | export function listenReceiveMessage() { 21 | event.on('message', function (msg: Message) { 22 | const { type, info, from } = msg 23 | notification[type]({ 24 | message: `来自【${from}】的消息`, 25 | description: info 26 | }) 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /packages/micro-app-demo/react-child/src/components/UserInfo/index.tsx: -------------------------------------------------------------------------------- 1 | import { useAppSelector } from '@/stores/storeHooks' 2 | import { Descriptions } from 'antd' 3 | 4 | const column = { xxl: 3, xl: 3, lg: 2, md: 2, sm: 1, xs: 1 } 5 | 6 | function UserInfo() { 7 | const user = useAppSelector(state => state.user.user) 8 | return user && 9 | {user.name} 10 | {user.age} 11 | {user.gender} 12 | {user.phone} 13 | 14 | } 15 | 16 | export default UserInfo 17 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "lib": ["DOM", "DOM.Iterable", "ESNext"], 6 | "allowJs": false, 7 | "skipLibCheck": true, 8 | "esModuleInterop": false, 9 | "allowSyntheticDefaultImports": true, 10 | "strict": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ESNext", 13 | "moduleResolution": "Node", 14 | "resolveJsonModule": true, 15 | "isolatedModules": true, 16 | "noEmit": true, 17 | "jsx": "react-jsx", 18 | "baseUrl": ".", 19 | "paths": { 20 | "@/*": ["./src/*"] 21 | } 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/utils/messageListener.ts: -------------------------------------------------------------------------------- 1 | import { notification } from 'ant-design-vue' 2 | import 'ant-design-vue/es/notification/style/css' 3 | export const RECEIVE_MESSAGE = 'receiveMessage' 4 | 5 | export enum Types { 6 | success = 'success', 7 | warn = 'warn', 8 | error = 'error', 9 | info = 'info' 10 | } 11 | 12 | export interface Message { 13 | info: string 14 | type: Types 15 | from: string 16 | } 17 | 18 | // 监听receiveMessage 19 | // 子应用触发type=receiveMessage的CustomEvent 20 | export function listenReceiveMessage() { 21 | window?.Garfish.channel.on('message', function(e: Message) { 22 | const { type, info, from } = e 23 | notification[type]({ 24 | message: `来自【${from}】的消息`, 25 | description: info 26 | }) 27 | }) 28 | } 29 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/views/CommunicationTest.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 23 | 24 | 25 | 26 | 31 | -------------------------------------------------------------------------------- /packages/wujie-demo/vite-child/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@wujie-demo/vite-child", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "start": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "@reduxjs/toolkit": "^1.8.5", 13 | "antd": "^4.23.4", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "react-redux": "^8.0.4", 17 | "react-router-dom": "^6.4.1" 18 | }, 19 | "devDependencies": { 20 | "@types/react": "^18.0.17", 21 | "@types/react-dom": "^18.0.6", 22 | "@vitejs/plugin-react": "^2.1.0", 23 | "less": "^4.1.3", 24 | "typescript": "^4.6.4", 25 | "vite": "^3.1.0", 26 | "vite-plugin-imp": "^2.3.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/garfish-demo/react-child/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | "types": [ 13 | "node" 14 | ], 15 | "allowJs": true, 16 | "skipLibCheck": true, 17 | "esModuleInterop": true, 18 | "allowSyntheticDefaultImports": true, 19 | "strict": true, 20 | "forceConsistentCasingInFileNames": true, 21 | "noFallthroughCasesInSwitch": true, 22 | "module": "esnext", 23 | "moduleResolution": "node", 24 | "resolveJsonModule": true, 25 | "isolatedModules": true, 26 | "noEmit": true, 27 | "jsx": "react-jsx" 28 | }, 29 | "include": [ 30 | "src" 31 | ], 32 | } 33 | -------------------------------------------------------------------------------- /packages/garfish-demo/vite-child/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@garfish-demo/vite-child", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "start": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "@reduxjs/toolkit": "^1.8.5", 13 | "antd": "^4.23.4", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "react-redux": "^8.0.4", 17 | "react-router-dom": "^6.4.1" 18 | }, 19 | "devDependencies": { 20 | "@types/react": "^18.0.17", 21 | "@types/react-dom": "^18.0.6", 22 | "@vitejs/plugin-react": "^2.1.0", 23 | "less": "^4.1.3", 24 | "typescript": "^4.6.4", 25 | "vite": "^3.1.0", 26 | "vite-plugin-imp": "^2.3.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript/recommended', 'plugin:prettier/recommended'], 7 | parserOptions: { 8 | ecmaVersion: 2020, 9 | }, 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 13 | 'prettier/prettier': [ 14 | 'error', 15 | { 16 | printWidth: 120, 17 | singleQuote: true, 18 | semi: false, 19 | trailingComma: 'es5', 20 | }, 21 | ], 22 | 'vue/multi-word-component-names': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off', 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript/recommended', 'plugin:prettier/recommended'], 7 | parserOptions: { 8 | ecmaVersion: 2020, 9 | }, 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 13 | 'prettier/prettier': [ 14 | 'error', 15 | { 16 | printWidth: 120, 17 | singleQuote: true, 18 | semi: false, 19 | trailingComma: 'es5', 20 | }, 21 | ], 22 | 'vue/multi-word-component-names': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off', 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vite-child/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@micro-app-demo/vite-child", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "start": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "@reduxjs/toolkit": "^1.8.5", 13 | "antd": "^4.23.4", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "react-redux": "^8.0.4", 17 | "react-router-dom": "^6.4.1" 18 | }, 19 | "devDependencies": { 20 | "@types/react": "^18.0.17", 21 | "@types/react-dom": "^18.0.6", 22 | "@vitejs/plugin-react": "^2.1.0", 23 | "less": "^4.1.3", 24 | "typescript": "^4.6.4", 25 | "vite": "^3.1.0", 26 | "vite-plugin-imp": "^2.3.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript/recommended', 'plugin:prettier/recommended'], 7 | parserOptions: { 8 | ecmaVersion: 2020 9 | }, 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 13 | 'prettier/prettier': [ 14 | 'error', 15 | { 16 | printWidth: 120, 17 | singleQuote: true, 18 | semi: false, 19 | trailingComma: 'none' 20 | } 21 | ], 22 | 'vue/multi-word-component-names': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off' 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript/recommended', 'plugin:prettier/recommended'], 7 | parserOptions: { 8 | ecmaVersion: 2020, 9 | }, 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 13 | 'prettier/prettier': [ 14 | 'error', 15 | { 16 | printWidth: 120, 17 | singleQuote: true, 18 | semi: false, 19 | trailingComma: 'es5', 20 | }, 21 | ], 22 | 'vue/multi-word-component-names': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off', 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/typescript/recommended', 'plugin:prettier/recommended'], 7 | parserOptions: { 8 | ecmaVersion: 2020, 9 | }, 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 13 | 'prettier/prettier': [ 14 | 'error', 15 | { 16 | printWidth: 120, 17 | singleQuote: true, 18 | semi: false, 19 | trailingComma: 'es5', 20 | }, 21 | ], 22 | 'vue/multi-word-component-names': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off', 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/views/ViteKeepAliveView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/views/Vue2KeepAliveView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue3-main/src/views/React18KeepAliveView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/views/TabView.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | -------------------------------------------------------------------------------- /packages/micro-app-demo/vue2-child/src/views/TabView.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/views/TabView.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | -------------------------------------------------------------------------------- /packages/wujie-demo/vue2-child/src/views/TabView.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/views/TabView.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 31 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vite-child/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@qiankun-demo/vite-child", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "start": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "@reduxjs/toolkit": "^1.8.5", 13 | "antd": "^4.23.4", 14 | "react": "^18.2.0", 15 | "react-dom": "^18.2.0", 16 | "react-redux": "^8.0.4", 17 | "react-router-dom": "^6.4.1" 18 | }, 19 | "devDependencies": { 20 | "@types/react": "^18.0.17", 21 | "@types/react-dom": "^18.0.6", 22 | "@vitejs/plugin-react": "^2.1.0", 23 | "less": "^4.1.3", 24 | "typescript": "^4.6.4", 25 | "vite": "^3.1.0", 26 | "vite-plugin-imp": "^2.3.0", 27 | "vite-plugin-qiankun": "^1.0.15" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue2-child/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 29 | 30 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue2-child/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 29 | 30 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue2-child/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 29 | 30 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/data/appData.ts: -------------------------------------------------------------------------------- 1 | export interface MicroApp { 2 | name: string 3 | entry: string 4 | container: string 5 | activeRule: string 6 | } 7 | 8 | export const vue2AppEntry = import.meta.env.VITE_VUE2_CHILD_ENTRY 9 | export const reactAppEntry = import.meta.env.VITE_REACT18_CHILD_ENTRY 10 | export const viteAppEntry = import.meta.env.VITE_VITE_CHILD_ENTRY 11 | 12 | export const apps = [ 13 | { 14 | name: 'vue2App', 15 | entry: vue2AppEntry, 16 | container: '#child-app', 17 | activeRule: '#/vue2App' 18 | }, 19 | { 20 | name: 'reactApp', 21 | entry: reactAppEntry, 22 | container: '#child-app', 23 | activeRule: '#/reactApp' 24 | }, 25 | { 26 | name: 'viteApp', 27 | entry: viteAppEntry, 28 | container: '#child-app', 29 | activeRule: '#/viteApp' 30 | } 31 | ] 32 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * feat:新增功能 3 | * fix:bug 修复 4 | * docs:文档更新 5 | * style:不影响程序逻辑的代码修改(修改空白字符,格式缩进,补全缺失的分号等,没有改变代码逻辑) 6 | * refactor:重构代码(既没有新增功能,也没有修复 bug) 7 | * perf:性能, 体验优化 8 | * test:新增测试用例或是更新现有测试 9 | * build:主要目的是修改项目构建系统(例如 glup,webpack,rollup 的配置等)的提交 10 | * ci:主要目的是修改项目继续集成流程(例如 Travis,Jenkins,GitLab CI,Circle等)的提交 11 | * chore:不属于以上类型的其他类型,比如构建流程, 依赖管理 12 | * revert:回滚某个更早之前的提交on 13 | */ 14 | module.exports = { 15 | extends: ['@commitlint/config-conventional'], 16 | rules: { 17 | 'type-enum': [ 18 | 2, 19 | 'always', 20 | [ 21 | 'feat', 22 | 'build', 23 | 'fix', 24 | 'docs', 25 | 'style', 26 | 'refactor', 27 | 'perf', 28 | 'test', 29 | 'chore', 30 | 'revert', 31 | 'init', 32 | ], 33 | ] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /packages/icestark-demo/vue3-main/src/data/appData.ts: -------------------------------------------------------------------------------- 1 | import type { AppConfig } from '@ice/stark/lib/apps' 2 | 3 | export const vue2PublicPath = import.meta.env.VITE_VUE2_CHILD_PUBLIC_PATH 4 | export const reactPublicPath = import.meta.env.VITE_REACT18_CHILD_PUBLIC_PATH 5 | export const vitePublicPath = import.meta.env.VITE_VITE_CHILD_PUBLIC_PATH 6 | 7 | export const apps: AppConfig[] = [ 8 | { 9 | name: 'vue2App', 10 | activePath: ['/vue2App'], 11 | url: [`${vue2PublicPath}/js/app.js`], 12 | hashType: true 13 | }, 14 | { 15 | name: 'reactApp', 16 | activePath: ['/reactApp'], 17 | url: [`${reactPublicPath}/static/js/app.bundle.js`], 18 | hashType: true 19 | }, 20 | { 21 | name: 'viteApp', 22 | activePath: ['/viteApp'], 23 | entry: vitePublicPath, 24 | hashType: true, 25 | loadScriptMode: 'import' 26 | } 27 | ] 28 | -------------------------------------------------------------------------------- /packages/garfish-demo/vue3-main/src/views/CommunicationTest.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 23 | 24 | 29 | 30 | 35 | -------------------------------------------------------------------------------- /packages/qiankun-demo/vue3-main/src/views/CommunicationTest.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 23 | 24 | 29 | 30 | 35 | --------------------------------------------------------------------------------