Feature request: recognize server-only folders #4093
Replies: 5 comments 3 replies
-
Currently it's not possible within config, you can use this patch by @kiliman though |
Beta Was this translation helpful? Give feedback.
-
This also makes me curious about how
Is |
Beta Was this translation helpful? Give feedback.
-
This would be hugely useful for me too! As my projects scale, its useful to co-locate lots of server files in one location (e.g. for third party integrations), and it'd be nice to not have to add a |
Beta Was this translation helpful? Give feedback.
-
This is something we have think about for some time too. Our codebase is separated in different layers (dto / services / dao). If this feature request is accepted, I would gladly help to implement it, if needed. Thank you ! |
Beta Was this translation helpful? Give feedback.
-
I am wondering if server-only folder is already supported (if so, from which version?). I just looked at the release note, but is it done with the combination of Vite (I am a bit new to Vite/Remix ecosystem, so apologies in advance if I am asking something obvious)? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I looked through the docs, issues and discussions, and didn't see anything that supported this.
To simplify adding and organizing server-only code, it would be awesome if remix had built-in support for a
server
folder, where all files inside that folder do not require the.server.*
suffix.Is this possible currently? If not, perhaps we can add support for server-only glob patterns in
remix.config.js
?edit: the closest thing I saw was ignoredroutefiles. Is that what I'm looking for? My assumption was that ignored routes would still be bundled with client code. Apologies if I misunderstood.
I also want to mention that I think the convention of using
*.server.ts
is great. I don't think having support for aserver
folder will confuse people or create a reason not to use*.server.ts
files in general.Beta Was this translation helpful? Give feedback.
All reactions