Mini Cart block: add ?ver= query param to script URLs (https://github.com/woocommerce/woocommerce-blocks/pull/4689)
This commit is contained in:
parent
12aa09c72c
commit
fe18b218a6
|
@ -123,7 +123,7 @@ const lazyLoadScript = ( {
|
|||
id: `${ handle }-js`,
|
||||
onerror: reject,
|
||||
onload,
|
||||
src: version ? `${ src }?${ version }` : src,
|
||||
src: version ? `${ src }?ver=${ version }` : src,
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ const preloadScript = ( {
|
|||
|
||||
if ( handleScriptElements.length === 0 ) {
|
||||
const prefetchLink = document.createElement( 'link' );
|
||||
prefetchLink.href = version ? `${ src }?${ version }` : src;
|
||||
prefetchLink.href = version ? `${ src }?ver=${ version }` : src;
|
||||
prefetchLink.rel = 'preload';
|
||||
prefetchLink.as = 'script';
|
||||
prefetchLink.id = `${ handle }-js-prefetch`;
|
||||
|
|
Loading…
Reference in New Issue