We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
preload插件是为了预先加载一些子应用的入口文件。但子应用的加载顺序存在优先级,看源码中的方案是依赖子应用实际的加载数来排序的。这就引入了一个问题,有些新加的子应用可能是比原先子应用的优先级高很多。但是在刚引入该子应用时,可能是在最后加载。preload就没有起到它的作用。
希望garfish,在run方法中可以传入一个初始化的子应用的优先级,且这个优先级是支持部分固化,部分动态计算。例如
interface AppRankRecord { [appName: string]: number }
若应用已存在缓存,则覆写这个配置。优先从AppRankRecord中取出,余下的按照原先的方案排优先级。
No response
The text was updated successfully, but these errors were encountered:
感谢你的反馈,之前 Garfish 内置的 preload Plugin 内置的一些规则确实无法满足用户的一些诉求,基于这个原因我们提供了 preloadApp API ,通过这个 API,你可以根据自己的加载规则和想法去封装自己的 plugin 进行预加载
Sorry, something went wrong.
preloadApp这个api是否能多提供个immediately参数,用来透传给loadAppResource呢
preloadApp 本身就是立即执行的
No branches or pull requests
Clear and concise description of the problem
preload插件是为了预先加载一些子应用的入口文件。但子应用的加载顺序存在优先级,看源码中的方案是依赖子应用实际的加载数来排序的。这就引入了一个问题,有些新加的子应用可能是比原先子应用的优先级高很多。但是在刚引入该子应用时,可能是在最后加载。preload就没有起到它的作用。
Suggested solution
希望garfish,在run方法中可以传入一个初始化的子应用的优先级,且这个优先级是支持部分固化,部分动态计算。例如
若应用已存在缓存,则覆写这个配置。优先从AppRankRecord中取出,余下的按照原先的方案排优先级。
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: