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

feat: add path alias #51

Closed
wants to merge 3 commits into from
Closed

feat: add path alias #51

wants to merge 3 commits into from

Conversation

djordje-st
Copy link

@djordje-st djordje-st commented Jun 27, 2022

This PR adds path aliases for better readability when importing modules.

To import a module it needs to be in the src directory.
Then, to import a component use the syntax below:
import Button from '~/components/Button'

I've replaced the current imports to use the alias.

Next.js docs: https://nextjs.org/docs/advanced-features/module-path-aliases

@djordje-st djordje-st marked this pull request as ready for review June 27, 2022 14:06
@Dhravya
Copy link
Contributor

Dhravya commented Jun 27, 2022

Didn't know this can be done! Thanks

From someone who doesn't know about the advanced features of NextJS, this can be confusing right?

@nexxeln
Copy link
Member

nexxeln commented Jun 27, 2022

This is nice to have, but we had discussed about this on discord and came to a conclusion that this shouldn't be included in the template

screenshot

Thank you though! From next time please open an issue before making a PR.

@nexxeln nexxeln closed this Jun 27, 2022
@asrvd
Copy link
Member

asrvd commented Jun 27, 2022

lol i was reviewing it

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

Successfully merging this pull request may close these issues.

None yet

4 participants