App reviews, troubleshooting, and recommendations
Hey! So I am attempting to create a custom web component in the product page via theme app extension on a custom app that I am planning on allowing Shopify owners to download. I have previous code for the web component that is written in TS (Type Script) and want to reuse it in my theme app extension. So my question is, am I able to include .ts code or any code besides .js and .css into the assets folder or anywhere else in the theme app extension file to allow me to import the web component onto their product page?
For reference this is the structure of the file https://shopify.dev/apps/online-store/theme-app-extensions/extensions-framework
I have seen other theme app extension files from other developers and saw that they included more than what was given in the original framework.
A separate question but also relevant. The typescript file needs an external library that's downloaded via npm. I know you can install libraries onto a custom app via npm but, would I be able to somehow reference libraries from my app to the theme app extension as a potential solution for my problem above? I have already tried this but have had no luck.
Thanks!
Solved! Go to the solution
This is an accepted solution.
I was not. It seems like the theme app extensions run purely on their vanilla language state. So, no imports are possible, I just got around this issue with writing longer code that the package does for me.
Have you ever been able to get this up and running?
I am very much interested in exactly what you are describing: Theme app extension in Typescript, ideally with the possibility to use external libraries.
This is an accepted solution.
I was not. It seems like the theme app extensions run purely on their vanilla language state. So, no imports are possible, I just got around this issue with writing longer code that the package does for me.
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024