Replies: 2 comments 2 replies
-
Hi, this setup is a little bit strange. If config is an internal package used by other packages it shouldn't be imported directly in the remix app I think. If remix needs to use it and the packages are not bundled then the Remix app needs to bundle them, and add their path to its tsconfig also. (Careful the path are relative "../" maybe something else from the remix app root tsconfig). I have another monorepo setup here https://github.com/PhilDL/ts-ghost that contains packages that are published to npm: These 2 packages are published and exposed to the public:
The package Then you have a Remix app (and a NextJs app) in the folder "dependencies": {
// other stuff
"@ts-ghost/admin-api": "*",
"@ts-ghost/content-api": "*",
} The app don't import core-api and it is working fine because admin-api and content-api are bundled. Maybe try to look at that repository to get inspiration or missing configs, it is a more "production-ready" example. |
Beta Was this translation helpful? Give feedback.
-
I think your right. I refactor it and close this one thank you. |
Beta Was this translation helpful? Give feedback.
-
Im trying to include a package inside another package. And have some problems, probably a small oversight.
I already used gpt to debug it but still get errors. Code examples shortened for clarity.
The case:
packages/site/package.json
packages/site/src/components/Navbar.tsx
Then I install in my remix-app example/package.json ( both the config and site packages )
And run ( after pnpm install from the turbo repro root ):
Outputs:
Also tried adding to tsconfig in the site package:
I literally tried everything but cannot get this resolved.
What is it I overlook, or do i need to approach this differently?
The configuration package contains a configuration base object for my whole app that i need in several other packages.
Really did some digging on this but cannot figure it out, hope someone knows.
Beta Was this translation helpful? Give feedback.
All reactions