Skip to content

Commit

Permalink
Add <meta name=robots content=noindex,nofollow> to the service worker…
Browse files Browse the repository at this point in the history
… to prevent indexing attempts of this page
  • Loading branch information
MTheProgrammer committed Feb 1, 2024
1 parent 2ecc6a7 commit 5061997
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/build-service-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ async function buildSandboxServiceWorker(opts: BuildOptions, msgType: MessageTyp
if (debug) {
const outName = `partytown-sandbox-${msgType}.js`;
await writeFile(join(opts.distLibDebugDir, outName), sandboxJsCode);
sandboxHtml = `<!DOCTYPE html><html><head><meta charset="utf-8"><script src="./partytown-sandbox-${msgType}.js?v=${opts.packageJson.version}"></script></head></html>`;
sandboxHtml = `<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="robots" content="noindex,nofollow"><script src="./partytown-sandbox-${msgType}.js?v=${opts.packageJson.version}"></script></head></html>`;
} else {
sandboxHtml = `<!DOCTYPE html><html><head><meta charset="utf-8"><script type="module">${sandboxJsCode}</script></head></html>`;
sandboxHtml = `<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="robots" content="noindex,nofollow"><script type="module">${sandboxJsCode}</script></head></html>`;
}

return sandboxHtml;
Expand Down

0 comments on commit 5061997

Please sign in to comment.