Giter Site home page Giter Site logo

vue-hot-swap's Introduction

基于vue + webpack的简化版微前端探索与实践

online-demo

构想

为toB业务线,提供一个简化版的微前端解决方案.通过基座+模块的灵活组合方式,根据特定业务形态下的需求,产出前端工程. (仅供学习交流)

特点

基座 + 业务模块的灵活组合

情景1



生产环境模块热插拔

情景2

原理

  1. umd方式打包模块
  2. loadJS加载模块

开发环境

安装依赖

yarn config set registry https://registry.npm.taobao.org -g
yarn

构建第三方依赖

npm run dll

运行

npm run dev

生产环境

构建第三方依赖

npm run dll
npm run build

单独打包架构

npm run core

单独打包基座

npm run frame --name="xxx"

单独打包业务模块/物料

npm run material --name="xxx"

通过dist/map.js中的文件名加载对应的模块,需要对应.

vue-hot-swap's People

Contributors

nextprops avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

1340691923

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.