Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微前端优化 #56

Open
TokenYangForever opened this issue Sep 9, 2024 · 0 comments
Open

微前端优化 #56

TokenYangForever opened this issue Sep 9, 2024 · 0 comments

Comments

@TokenYangForever
Copy link
Owner

结合实际场景的微前端,微前端架构有一个关键优势在于技术栈无关,我们团队内部技术栈相对统一,所以在技术栈统一的背景下,做了一些特定优化:
将一些第三方的公共库打包的时候外置化:vue、vuex等等,并且可以在基座将一些公共逻辑mixin到全局vue对象上,子应用无须再次加载公共库资源,且一些vue相关的公共逻辑开箱即用。
可复用的公共组件单独封装成远程组件,例如子应用A中有一个表单组件能在其他子应用内复用,那么在打包的时候会把这个组件单独打包成一份,可以供给其他子应用调用,每个子应用都可以是远程组件的提供者和使用者。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant