Mini Cart block: add ?ver= query param to script URLs (https://github.com/woocommerce/woocommerce-blocks/pull/4689)

This commit is contained in:
Albert Juhé Lluveras 2021-09-08 13:17:30 +02:00 committed by GitHub
parent 12aa09c72c
commit fe18b218a6
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ const lazyLoadScript = ( {
id: `${ handle }-js`,
onerror: reject,
onload,
src: version ? `${ src }?${ version }` : src,
src: version ? `${ src }?ver=${ version }` : src,
} );
} );
};

View File

@ -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`;