Code Monkey home page Code Monkey logo

qiankun-vue-demo's Introduction

项目说明 qiankun-vue-demo

qiankun来实现vue技术栈的前端微服务

main是主项目,app-vue-hashhash模式路由的子项目,app-vue-historyhistory模式路由的子项目

qiankun的开发和打包和正常模式一模一样,它使用一个全局变量__POWERED_BY_QIANKUN__来区分微前端模式和正常模式,不需要额外的配置和代码。

具体的原理分析和介绍可以看:qiankun 微前端方案实践及总结qiankun 微前端实践总结(二)

运行和打包

在根目录下:

先安装依赖: npm install,再执行npm run install-all为所有项目安装依赖,最后执行npm run start-all即可启动所有的项目。

npm run build-all可以打包所有vue项目,jQuery项目不需要打包。

分支介绍

  • master 分支: qiankun 的常规基础用法
  • feature/hash-router 分支 :主子项目都是 hash 模式
  • feature/keep-alive 分支 :使用 loadMicroApp 来实现 keep-alivetab 效果
  • feature/share-component 分支 :项目间共享组件的例子
  • feature/routing-page 分支 :在主项目的某个路由页面加载子应用
  • feature/share-dependencies 分支 :子项目复用主项目的公共依赖(vue,vuex,vue-router),以及主子项目间 i18n 的处理
  • feature/vite-child 分支 :子项目是 vite 构建的 vue3 项目
  • feature/use-main-app-component 分支 :子项目复用主项目的依赖
  • feature/abstract-route 分支 :主项目同时展示两个子应用的不同页面,子项目使用 abstract 路由
  • develop 分支 :修改源码来实现 keep-alive,以及公共依赖的复用的例子

qiankun-vue-demo's People

Contributors

dependabot[bot] avatar gongshun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.