├── .github
└── workflows
│ └── github-pages.yml
├── .gitignore
├── README.md
├── docs
├── .vuepress
│ ├── components
│ │ ├── Foo
│ │ │ └── Bar.vue
│ │ ├── OtherComponent.vue
│ │ └── demo-component.vue
│ ├── config.js
│ ├── enhanceApp.js
│ ├── public
│ │ ├── CNAME
│ │ ├── authors
│ │ │ ├── jothy1023.png
│ │ │ ├── pigcan.png
│ │ │ └── ulivz.png
│ │ ├── hy-back-text.png
│ │ ├── logo.png
│ │ ├── sddefault.jpg
│ │ └── team.png
│ ├── redirects
│ └── theme
│ │ ├── components
│ │ ├── Author.vue
│ │ ├── EditIcon.vue
│ │ ├── FeedbackIcon.vue
│ │ ├── Home.vue
│ │ ├── NavLink.vue
│ │ ├── Navbar.vue
│ │ ├── RSS.vue
│ │ └── Recommend.vue
│ │ ├── global-components
│ │ ├── Black.vue
│ │ ├── CardLink.vue
│ │ ├── Center.vue
│ │ ├── HeadingCorner.vue
│ │ └── Highlight.vue
│ │ ├── index.js
│ │ ├── layouts
│ │ ├── BlogBlockLayout.vue
│ │ ├── BlogPostPage.vue
│ │ ├── BlogSimpleLayout.vue
│ │ ├── IndexPost.vue
│ │ ├── Layout.vue
│ │ ├── Post.vue
│ │ └── Team.vue
│ │ └── styles
│ │ ├── font.css
│ │ ├── index.styl
│ │ └── palette.styl
├── README.md
├── about
│ └── README.md
├── blog
│ └── _posts
│ │ ├── 2019-12-02-invitation.md
│ │ └── 2019-12-21-explore-the-way-of-real-time-build-based-on-browser.md
├── team
│ └── README.md
└── translations
│ └── _posts
│ └── 2020-3-27-webpack-5-module-federation
│ ├── assets
│ ├── example-1.png
│ ├── example-2.png
│ ├── example-3.png
│ ├── example-4.png
│ ├── kevin-saldana-tweet.png
│ ├── main.png
│ ├── marais.png
│ ├── zack-jackson-tweet-2.png
│ ├── zack-jackson-tweet-3.png
│ ├── zack-jackson-tweet-4.png
│ ├── zack-jackson-tweet.png
│ └── zack-jackson.png
│ └── index.md
└── package.json
/.github/workflows/github-pages.yml:
--------------------------------------------------------------------------------
1 | # This is a basic workflow to help you get started with Actions
2 |
3 | name: CI
4 |
5 | # Controls when the action will run. Triggers the workflow on push or pull request
6 | # events but only for the master branch
7 | on:
8 | push:
9 | branches: [ master ]
10 |
11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
12 | jobs:
13 | # This workflow contains a single job called "build"
14 | build:
15 | # The type of runner that the job will run on
16 | runs-on: ubuntu-latest
17 |
18 | # Steps represent a sequence of tasks that will be executed as part of the job
19 | steps:
20 | # 切代码到 runner
21 | - uses: actions/checkout@v1
22 | with:
23 | submodules: true
24 | # 下载 git submodule
25 | - uses: srt32/git-actions@v0.0.3
26 | with:
27 | args: git submodule update --init --recursive
28 | # 使用 node:10
29 | - name: use Node.js 10.x
30 | uses: actions/setup-node@v1
31 | with:
32 | node-version: 10.x
33 | - name: Vuepress to GitHub Pages
34 | uses: testthedocs/github-pages-deploy-action@0.0.2
35 | env:
36 | ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
37 | BUILD_DIR: docs/.vuepress/dist # The folder, the action should deploy.
38 | BUILD_SCRIPT: yarn && yarn build # The build script the action should run prior to deploying.
39 | # 设置阿里云OSS的 id/secret,存储到 github 的 secrets 中
40 | - name: setup aliyun oss
41 | uses: manyuanrong/setup-ossutil@master
42 | with:
43 | endpoint: oss-cn-hangzhou.aliyuncs.com
44 | access-key-id: ${{ secrets.OSS_KEY_ID }}
45 | access-key-secret: ${{ secrets.OSS_KEY_SECRET }}
46 | - name: cp files to aliyun
47 | run: ossutil cp -rf docs/.vuepress/dist oss://richlab/
48 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | pids
2 | logs
3 | yarn.lock
4 | node_modules
5 | npm-debug.log
6 | coverage/
7 | run
8 | dist
9 | .DS_Store
10 | .nyc_output
11 | .basement
12 | config.local.js
13 | basement_dist
14 | .temp
15 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # RichLab's world
2 |
3 | - [Home](https://richlab.design/)
4 | - [About](https://richlab.design/about/)
5 | - [Blog](https://richlab.design/blog/)
6 | - [Translations](https://richlab.design/translations/)
7 |
8 | ## Development
9 |
10 | ```bash
11 | yarn dev
12 | yarn build
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/.vuepress/components/Foo/Bar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ msg }}
4 | This is another component
3 | {{ msg }}
4 |
Oh, hello, nice to meet you!
13 |Professional & Creative & Freedom & Love.
15 |
3 |
3 |
3 |5 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /docs/.vuepress/theme/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extend: '@vuepress/theme-default' 3 | } 4 | -------------------------------------------------------------------------------- /docs/.vuepress/theme/layouts/BlogBlockLayout.vue: -------------------------------------------------------------------------------- 1 | 2 |4 |
22 | 在 RichLab, 23 | 我们打造的前端项目每天都被数百万用户在使用。我们相信,是保持年轻、好玩、认真的心态,让团队富有创造力。这是每一位成员聚集在一起形成的团队基因。 24 |
25 |49 | 「得益于蚂蚁金服花呗借呗亿级用户的金融平台,我们有机会通过自研 2D/3D 50 | 引擎 (Oasis) 51 | 和工作流,开发出动画、游戏等富交互应用,帮助业务获得更高的增长。」 52 |
53 |54 | —— RichLab 自研 2D/3D 引擎 Oasis 负责人 烧鹅 55 |
56 |83 | 每年双十一,我们既在忙碌和紧张中面对稳定性的挑战,又在并肩作战中感受快乐。 84 |
85 |98 | RichLab 99 | 全员每年践行阿里巴巴「公益时」。从社区服务,到环境清洁,向外界贡献技术之外的价值。 100 |
101 |121 | 代码不是生活的全部,我们在音乐、越野、运动、旅行等领域都可以大展身手。 122 |
123 |「{{ hobit.content }}」
132 |—— {{ hobit.quote }}
133 |如果你想成为我们的一份子,请点击 此处。
140 |我们期待一个独一无二的你。
141 |62 | 63 |
64 | 65 | 66 | 虽然真山不知道怎么做出来,但他觉得很酷,WebGL,特效,渲染,这些于他只是浅尝辄止的世界,此刻显得有些陌生,不过,接着鹅叔就对他说了一句让他印象深刻的话: 67 | 68 | > “ __Oasis3D 的使命就是要把 3D 开发的荒漠变成绿洲,让每个前端工程师都能轻松开发专业的 3D 应用,让 Web 世界也能达到影视级的绚丽多姿。__” 69 | 70 | 71 | 多么美好的愿景!真山期待着有一天也能轻松地产出这样的动画,同时,这是真山第一次体会到:原来技术人员的梦想可以可以这般绚烂。 72 | 73 | 这让真山想到他过去一年在 RichLab 的一个作品 —— 一个面向蚂蚁前端开发者的营销研发框架 **Sherry**。很久以前,真山这样地聊过 Sherry: 74 | 75 | > “ __我们在开发 Sherry 的过程中,习惯了以用户视角倒过来看,首先思考用户期望的是什么?提示和文档要写成什么样才简洁易懂?当想清楚这些后,Sherry 就拥有了它的灵魂。__” 76 | 77 | 78 |  79 | 80 | 看着屏幕上朦胧的光与影,真山陷入了沉思,他似乎陷入了对 Sherry 愿景的构思中。 81 | 82 | 突然,“咔嚓”一声,几米开外的 @玄寂 给正在聊天的众人拍了一张照片,似乎引起了真山的注意,于是他走过去,开始跟玄寂交谈起来。 83 | 84 | 他对玄寂的第一印象是,一个技术一流、充满着复古气息的英俊男子,工作中,他研发了一个基于浏览器端的构建和调试方案: 85 | 86 |  87 | 88 | @玄寂 对该产品的介绍是: 89 | 90 | > “ __Gravity 是一套完全基于浏览器技术实现的预览和调试解决方案。它通过合理的运行时代码编译模式,完整的基于浏览器的文件系统,轻巧的包管理模式,让整个前端的研发模式被完整的移植到了浏览器内。__” 91 | 92 | 93 | 这个产品惊艳到了真山,因为他从来没有相关的经验,他也对此充满了兴趣。 94 | 95 | 更让真山想不到的是,原来玄寂还是一位实实在在的摄影与旅游达人,这和真山的兴趣不谋而合,于是,真山开始听着玄寂畅谈他关于旅行的轶事 —— 那些瞬间的美好,就如同他 VLOG 中的画面一样: 96 | 97 | 98 | 99 | 聊着聊着,一天就这样悄悄地过去了~ 100 | 101 | 102 | ##[ˌfedəˈreɪʃn]
使 JavaScript 应用得以在客户端或服务器上动态运行另一个 bundle 或者 build 的代码。
14 |
15 | > 原文:[Webpack 5 Module Federation: A game-changer in JavaScript architecture](https://medium.com/@ScriptedAlchemy/webpack-5-module-federation-a-game-changer-to-javascript-architecture-bcdd30e02669)
16 |
17 | ---
18 |
19 | **Module Federation 之于 JavaScript Bundler,如同 Apollo 之于 GraphQL。**
20 |
21 | > 在独立的应用之间共享代码的可伸缩解决方案从未如此方便,而且几乎不可能大规模实现。此前我们拥有的最成熟方案是 externals 或 DLLPlugin,它们强制把依赖集中于一个外部文件中。共享代码真的很麻烦,因为很多应用看似独立,却不是真正意义上的独立,可共享的依赖非常有限。此外,在单独打包的 Web 应用之间共享实际的特性代码往往并不可行、**无效**、且毫无益处。
22 |
23 | ## 那么什么是 Module Federation?
24 |
25 | 这是我发明并且赋予它最初形态的 JavaScript 架构,在我的联合创作者兼 Webpack 创始人的帮助下,它成为了 Webpack 5 Core 中最令人兴奋的功能之一(Webpack 5 有一堆很酷的东西,新的 API 强大又干净)。
26 |
27 |
40 |
41 |
54 | 55 |
56 | 57 |