Developer-DAO / DAO-job-board

A job board connecting DAOs with talent.
https://devdao-job-board.vercel.app/
82 stars 34 forks source link

Updated all Module path aliases #63

Closed frankTurtle closed 2 years ago

frankTurtle commented 2 years ago

What does it fix?

Solves #61 No longer using ../../../../folder/lib imports in the client folder

Notes

For some reason the aliases don't work?

vercel[bot] commented 2 years ago

@frankTurtle is attempting to deploy a commit to the Developerdao Team on Vercel.

A member of the Team first needs to authorize it.

G3root commented 2 years ago

Absolute imports makes it easier to move files around and avoid messy import paths such as ../../../Component.

Other than having multiple paths for different folders (such as @components, @hooks, etc...) , Using @/* or ~/* works very well because it is short enough so there is no need to configure multiple paths and it differs from other dependency modules, so there is no confusion in what comes from node_modules and what is our source folder.

Example config for current structure.

// tsconfig.json
"compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["*"]
    }
  }
carlomigueldy commented 2 years ago

Absolute imports makes it easier to move files around and avoid messy import paths such as ../../../Component.

Other than having multiple paths for different folders (such as @components, @hooks, etc...) , Using @/* or ~/* works very well because it is short enough so there is no need to configure multiple paths and it differs from other dependency modules, so there is no confusion in what comes from node_modules and what is our source folder.

Example config for current structure.

// tsconfig.json
"compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["*"]
    }
  }

Yup let's go with this one @frankTurtle

frankTurtle commented 2 years ago

I'll get this pushed tomorrow, sorry for the delay!

frankTurtle commented 2 years ago

Give 'er a look-see @with-heart && @carlomigueldy

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/developdao/dao-job-board/ESw7jodffFKYea1A2w5TuabMycHR
✅ Preview: https://dao-job-board-git-fork-frankturtle-feature-pa-85ae14-developdao.vercel.app