replace
Register a URL which, if referenced in a block element, should be replaced with the given value.
This is useful if a dependency you use brings in a URL link to something like an external CDN that you don't want to use for some reason (often, GDPR), so you want to swap it out for a local version that you have already downloaded (and put in your public
folder).
replace("https://example.cdn.com/some-font.woff2", "/assets/fonts/some-font.woff2")
Content copied to clipboard
NOTE: Consider using selfHosting instead if you want to automate the process of downloading and replacing external links with local copies. Once you register a URL to replace, the self-hosting logic will skip over it.