How to get latest asset file version from CDN?

Shopify Partner
2 0 1

1 use liquid asset_url


<script type="module" src="{{ '' | asset_url }}"></script>


after compilation

<script type="module" src="//someStore/cdn/shop/t/386/assets/"></script>

It's correct, will get the latest version.

2 remove ?v= parameter


will get the older version


Because I need to use javascript module to import library, cannot use liquid asset_url

// assets/app.js
import {createApp, reactive} from './';

is any idea to resolve this issue?

Replies 0 (0)