The main repository is a single page app that's mostly Typescript compiled via Svelte down to a JavaScript bundle.
Most of that repository is a series of modules in their own directories (e.g., "src/modules/character").
The second repository is a Node.js API. The majority of its functionality comes from one of the modules from the first repository that I copy in its entirety to the other repository whenever I change it.
You should check git submodules out. Basically you could have your api-repo checkout certain commit from the spa-repo to a folder in the project root and reference the module reltive to that path.
Could you add the character module as a new package, the import it in the server with something like “char-package”: “file:../../client/modules/character”?
Most of that repository is a series of modules in their own directories (e.g., "src/modules/character").
The second repository is a Node.js API. The majority of its functionality comes from one of the modules from the first repository that I copy in its entirety to the other repository whenever I change it.