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

View File

@@ -222,9 +222,7 @@ export class DocRendererController {
readFileSync(manifestPath, 'utf-8') readFileSync(manifestPath, 'utf-8')
); );
const publicPath = this.config.isSelfhosted const publicPath = this.config.isSelfhosted ? '/' : assets.publicPath;
? this.config.server.host + '/'
: assets.publicPath;
assets.publicPath = publicPath; assets.publicPath = publicPath;
assets.js = assets.js.map(path => publicPath + path); assets.js = assets.js.map(path => publicPath + path);