How does Horizon support @theme imports inside JavaScript files in assets?
Reproduction steps
Nothing
Additional info
Hi Shopify community,
I’m trying to better understand how the Horizon theme handles a functionality that allows importing modules using @theme and using them inside .js files located in the assets folder.
For example, I would like to understand:
How @theme imports are resolved internally
Whether this is officially supported in Horizon or part of a custom build setup
Best practices for structuring imports when working with JavaScript files in assets
My goal is to understand how this works under the hood and whether it can be replicated or extended in custom Shopify themes.
Any documentation, examples, or technical insights would be greatly appreciated.