I’ve kind of fixed the issue. Seems like the “@shopify/app” and “@shopify/cli” really just does not like to work with TS.
What made the project build and TS compile:
- Separating the
yarn tsc -wandyarn devcommands into two processes - Always referencing to
.jsfiles (the TS compiler is smart enough to use TS still, but we trick the app)
This sort of works. However the setup will be totally bloated, since the app still depends on .js files to work. This means, that everywhere we make a .tsx or .ts file, we will have a duplicate .js file for the app to work.
^ This is not really a good solution. Left here as a reference.
Upvote this: https://github.com/Shopify/cli/issues/158