Skip to content

Issue importing from mono repro package in remix mixed client server #105

@Jarrodsz

Description

@Jarrodsz

Hello everyone,

A few months ago, I encountered a significant issue related to importing code in a mono repository setup, specifically when trying to separate server and client code. At the time, I spent many hours attempting to resolve it without success and eventually set it aside due to frustration.

The core of the problem involved a mix-up between server and client code when importing from a package within a mono repo. This was particularly evident when integrating with a Remix app and attempting to use Kiliman's Remix route package. The goal was to encapsulate routes (like authentication) within their respective packages.

I plan to migrate my packages, currently residing in app/packages of a non-mono repo setup, back to a mono repo next year. However, this importing issue was a major obstacle.

To give more context, I was working with Remix v1.18 at that time, and now we have moved to v2.4. It's possible this issue might have been addressed in the newer version.

I'll post some code samples tomorrow for a clearer illustration. Essentially, we need a mechanism to segregate client and server code within packages, ensuring that imports do not get mixed up.

It might be beneficial to discuss the challenges of using mono repos in Remix apps more broadly. If anyone has encountered and resolved this issue or can suggest workarounds, your insights would be greatly appreciated. Such a discussion could help avoid lengthy configuration and troubleshooting headaches in the future.

Thank you for your assistance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions