Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paths support in tsconfig #85

Closed
OlegGulevskyy opened this issue Jul 3, 2022 · 7 comments
Closed

Paths support in tsconfig #85

OlegGulevskyy opened this issue Jul 3, 2022 · 7 comments

Comments

@OlegGulevskyy
Copy link

Is your feature request related to a problem? Please describe.
Currently all imports in scaffold are in a shape of ../../server/..something, which makes it clunky and harder to read, in my opinion. I don't really know what others think on this point.

Describe the solution you'd like
Would you accept a PR changing the tsconfig.json in template and respective file to use something like @server/db/..etc instead of ../../server/..etc?

Describe alternatives you've considered
Keep as is if there is a good reason why paths aliases aren't worth the scaffold

@t3dotgg
Copy link
Member

t3dotgg commented Jul 4, 2022

I would dig a "src/" or "app/" path alias of some form. Had back luck w/ path aliasing and monorepos tho so not sure if I'd want it to be the default 🤔

@nexxeln
Copy link
Member

nexxeln commented Jul 4, 2022

We won't implement this, a person brought it up on the discord server and we had decided that if someone is unfamiliar with paths, they will be really confused.

If you want to, you can make the path alias on your own.

We could also make this a prompt but is this really required?

@OlegGulevskyy
Copy link
Author

Appreciate your response guys!
I can see how this can be annoying in monorepos.
I would not call it a strong requirement, to me it was a small but improvement as I dislike these forests of empty slashes, so I don't think it deserves a CLI prompt just for this.
One can do a small refactor or fork it and make personal changes then :)

Thanks!

@nexxeln
Copy link
Member

nexxeln commented Jul 4, 2022

Yeah agreed, I'm closing this now

@ochicf
Copy link
Contributor

ochicf commented Jul 13, 2022

Sorry to necromance this but it's semi-related: what are your thoughts on having path aliases in the create-t3-app code? I'm asking because with the issue #116 I'm having to import files that are quite far away and that causes tons of ../../.. in imports.

@ochicf
Copy link
Contributor

ochicf commented Jul 17, 2022

@juliusmarminge sorry to ping you, not sure if you saw the above comment.

Since I think those aliases affect only the contributors and not the consumers maybe it's a different topic and the decision taken here does not apply? If you see fit I'll create a new issue to discuss how the aliases should be.

@juliusmarminge
Copy link
Member

@juliusmarminge sorry to ping you, not sure if you saw the above comment.

Sorry didn't get notified of that.

Since I think those aliases affect only the contributors and not the consumers maybe it's a different topic and the decision taken here does not apply? If you see fit I'll create a new issue to discuss how the aliases should be.

Yeah do that and we can take it from there 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants