How to reuse liquid snippets from extension app in theme

Topic summary

Issue: Developers cannot reuse Liquid snippets from app extensions in theme files outside the extension’s own blocks.

Current Setup:

  • App extension structure includes blocks/ and snippets/ directories
  • {% render 'my-snippet' %} works within extension blocks (e.g., app-block.liquid)
  • Attempting to render the same snippet in theme files (e.g., product-card.liquid) fails with “Could not find asset” error

Root Cause:
App extension assets are published separately from the theme directory, making snippets inaccessible to theme templates.

Attempted Solutions:

  • Tried using special paths like {% render '<app-name>/my-snippet' %} or {% render '<app-id>/my-snippet' %} without success
  • Cannot add blocks via theme customizer in certain template contexts

Status: Unresolved. A second developer encountered the same limitation while trying to break up large templates into smaller chunks to address Shopify CLI warnings about excessive line counts.

Summarized with AI on November 20. AI used: claude-sonnet-4-5-20250929.

I’ve create an app-extension which is working fine.
i use :
extensions//blocks/app-block.liquid
extensions//blocks/app-embed.liquid

i use also :
extensions//snippets/my-snippet.liquid

I’m able to render my-snippet.liquid in app-block.liquid like that :
{% render ‘my-snippet’ %} and all works fine.

but now i need to use {% render ‘my-snippet’ %} somewhere else in my theme. In product-card.liquid in my case.
There is no possibility to add block via Customise in this situation.

When i try to {% render ‘my-snippet’ %} in product-card.liquid i get an error

Liquid error (snippets/product-card line 89): Could not find asset snippets/my-snippet.liquid

I understand that now app extension have assets separated from Theme directory and are published via extension.

How can i {% render ‘my-snippet’ %} in product-card.liquid ?
It is possible? there is a special path like {% render ‘/my-snippet’ %} or {% render ‘/my-snippet’ %}

Thanks in advance.

2 Likes

I came here for the same thing. Shopify CLI gives me a warning that my “Template has too many lines”, so I’m trying to clean things up into smaller render chunks as needed - but I cant due to the issue you stated above.