in packages/docusaurus-plugin-pwa/src/index.ts [105:131]
injectHtmlTags() {
const headTags: HtmlTags = [];
if (isProd && pwaHead) {
pwaHead.forEach(({tagName, ...attributes}) => {
(['href', 'content'] as const).forEach((attribute) => {
const attributeValue = attributes[attribute];
if (!attributeValue) {
return;
}
const attributePath =
!!path.extname(attributeValue) && attributeValue;
if (attributePath && !attributePath.startsWith(baseUrl)) {
attributes[attribute] = normalizeUrl([baseUrl, attributeValue]);
}
});
return headTags.push({
tagName,
attributes,
});
});
}
return {headTags};
},