You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// In single-spa, the assets need to be loaded from a dynamic location,// instead of hard coded to `/assets`. We use webpack public path for this.// See https://webpack.js.org/guides/public-path/#rootexportfunctionassetUrl(url: string): string{// @ts-ignoreconstpublicPath=__webpack_public_path__;constpublicPathSuffix=publicPath.endsWith('/') ? '' : '/';consturlPrefix=url.startsWith('/') ? '' : '/';return`${publicPath}${publicPathSuffix}assets${urlPrefix}${url}`;}
子应用是angular项目,配置了__webpack_public_path__,但是加载的静态资源图片404.
子应用配置public-path.js:
子应用图片使用的相对路径
但是加载子应用的时候,静态资源的路径是从主应用去获取的 http://localhost:3000/assets/svgs/nohistory.svg
主应用: http://localhost:3000/
子应用: http://localhost:4200/
The text was updated successfully, but these errors were encountered: