Giter VIP home page Giter VIP logo

luwuer.com's Introduction

构建**

本项目核心**是模块懒加载化,我把模块分为两类:

  1. 基础模块,提供框架和 UI 库,单个
  2. 附加模块,业务属性独立的功能或项目,多个

基础模块提供插槽,插槽允许拥有合法接口的附加模块插入,他有如下特性:

  • 初始状态插槽是空的,需要访问附加模块时浏览器才会下载它们,所以不用担心模块增多导致首屏加载变慢 (模块懒加载)
  • 基础模块和附加模块独立打包,所以不用担心修改一个模块就必须重新打包所有模块 (模块为什么可以懒加载)
  • 一旦附加模块被下载,基础模块就会立即注册它们 (模块独立打包后为什么能运行)
  • 项目拥有单页风格,即模块之间通过路由跳转 (相对于模块单独部署的优势)

附加模块列表

使用

# 安装依赖
yarn

# 启动开发服务
yarn dev

# 打包基础模块
yarn build

# 打包附加模块
yarn mod {modNameA} {modNameB} {...}

# 打包公共库
yarn dll

luwuer.com's People

Contributors

dependabot[bot] avatar luwuer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

libin1991

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.