Using Typescript component in non-Typescript app

I was wondering if someone could direct me to some resources that might be able to help me solve an issue I’ve been struggling with.

We have an existing Laravel/Vue app (not SPA, in JS) and we’re building a very involved Vue component (using Typescript) that we would like to import in our new app.

We’re looking at using lerna to manage everything in one monorepo, but leave the component as its own package.

I’ve found that we’re stuck with one of two options:

  • compile everything in the main app (so having to bring in all the TS dependencies, etc into the main app), and support hot module reloading when I’m working on the external component (using src files, ie. src/index.ts).
  • have the component pre-compiled, but lose the ability to do hot module reloading while I work on the external component since I need to compile the library manually (using dist files ie. dist/index.ts).

Am I missing something?