diff --git a/templates/astro-starter/scripts/check-dist.mjs b/templates/astro-starter/scripts/check-dist.mjs index 991f4cb7..5ffba69b 100644 --- a/templates/astro-starter/scripts/check-dist.mjs +++ b/templates/astro-starter/scripts/check-dist.mjs @@ -121,15 +121,23 @@ if (await exists(join(dist, 'wp-query-map.json'))) { const WP_RUNTIME = /\/wp-(?:includes|content|json)\/|jquery(?:\.min)?\.js/i const ABSOLUTE = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i -/** A script or stylesheet from WordPress, a site path into it, or inline script that names it. */ +const sitePath = value => WP_RUNTIME.test(value) && !ABSOLUTE.test(value) +/** Every url(…) address in CSS text, from a style attribute (entity-quoted) or a