Enable contenthash in filename for dynamic assets (#20813)
This should solve the main problem of dynamic assets getting stale after a version upgrade. Everything not affected will use query-string based cache busting, which includes files loaded via HTML or worker scripts.
This commit is contained in:
parent
0a9ed54abb
commit
56220515fc
15 changed files with 1102 additions and 802 deletions
|
@ -97,3 +97,8 @@ export function prettyNumber(num, locale = 'en-US') {
|
|||
const {format} = new Intl.NumberFormat(locale);
|
||||
return format(num);
|
||||
}
|
||||
|
||||
// parse a URL, either relative '/path' or absolute 'https://localhost/path'
|
||||
export function parseUrl(str) {
|
||||
return new URL(str, str.startsWith('http') ? undefined : window.location.origin);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue