UNPKG

610 BJavaScriptView Raw
1"use strict";exports.__esModule=true;exports.generateBuildId=generateBuildId;async function generateBuildId(generate,fallback){let buildId=await generate();// If there's no buildId defined we'll fall back
2if(buildId===null){// We also create a new buildId if it contains the word `ad` to avoid false
3// positives with ad blockers
4while(!buildId||/ad/i.test(buildId)){buildId=fallback();}}if(typeof buildId!=='string'){throw new Error('generateBuildId did not return a string. https://nextjs.org/docs/messages/generatebuildid-not-a-string');}return buildId.trim();}
5//# sourceMappingURL=generate-build-id.js.map
\No newline at end of file