fix(server): wrong public path for selfhosted doc renderer (#8660)

closes #8639
This commit is contained in:
forehalo
2024-11-01 07:56:01 +00:00
parent f36097732a
commit e87963eca4
@@ -222,9 +222,7 @@ export class DocRendererController {
readFileSync(manifestPath, 'utf-8')
);
const publicPath = this.config.isSelfhosted
? this.config.server.host + '/'
: assets.publicPath;
const publicPath = this.config.isSelfhosted ? '/' : assets.publicPath;
assets.publicPath = publicPath;
assets.js = assets.js.map(path => publicPath + path);