-
Notifications
You must be signed in to change notification settings - Fork 170
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
mountModule加载微模块时runtime是否可支持import导入的三方库 #678
Comments
runtime 中的依赖 目前是需要搭配 external 的方式引入的,即引入的 url 为 umd 资源链接,同时在构建工程上需要配置 externals |
@ClarkXia 您好,如果runtime可以支持import导入的三方库,这样可以把三方库都在放在主项目中,微模块共享主项目的三方库,保持微模块打包后的最小体积 |
现在 external 的方式 就能达到这个效果 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题:mountModule加载微模块时runtime是否可支持import导入的三方库
期望的类似效果:
import axios from 'axios';
import { mountModule, unmoutModule } from '@ice/stark-module';
const moduleInfo = {
name: 'moduleName',
url: 'https://localhost/module.js',
runtime: [ { id: 'axios', url: axios } ],
};
mountModule(moduleInfo, mountNode);
The text was updated successfully, but these errors were encountered: