Enable javascript in your browser for better experience. Need to know to enable it? Go here.

微前端中的模块映射

Published : Apr 13, 2021
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar. Understand more
Apr 2021
Assess ?

当使用多个 微前端来组建应用程序时,系统的某些部分需要确定加载哪些微前端以及从哪里加载它们。一直以来,我们要么通过构建定制化解决方案,要么采用single-spa之类的热门框架来解决这个问题。最近出现了一个新标准模块映射,它对这两种方案都有所助益。我们的初步经验表明,使用 微前端中的模块映射 可以清晰地分离关注点。它使用JavaScript代码说明要导入的内容,同时在初始化HTML的响应中使用一个轻量脚本指定从哪里加载微前端。 显然,HTML是在服务器端生成的,这样在渲染过程中就可以使用一些动态配置。在许多方面,这种技术让我们想起了动态Unix库的linker/loader目录。目前,只有Chrome浏览器支持模块映射,但是通过SystemJS polyfill就可以使它得到更加广泛的应用。

Download the PDF

 

 

 

English | Português 

Sign up for the Technology Radar newsletter

 

 

Subscribe now

Download the PDF

 

 

 

English | Português 

Sign up for the Technology Radar newsletter

 

 

Subscribe now

Visit our archive to read previous volumes