Skip to content

Script Module Deferred ​

Generates an HTML <script> tag with a type attribute of module and the defer attribute for a given resource URL.

Example ​

liquid
{{ 'index.js' | asset_url | script_module_deferred }}

Output

html
<script src="https://cdn.youcan.shop/s/files/1/0561/7470/6753/t/1/assets/index.js?v=173664653397615025201664456763" type="module" defer></script>