Skip to content

Commit

Permalink
fix: add alias for modules import
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Nov 12, 2024
1 parent 8ec092b commit 1e1be38
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ cypress/videos
!.yarn/sdks
!.yarn/versions

# ts build artifacts
*.tsbuildinfo
5 changes: 2 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
"^@?graasp",
"<THIRD_PARTY_MODULES>",
"^@/",
"^~",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"plugins": [
"@trivago/prettier-plugin-sort-imports"
]
"plugins": ["@trivago/prettier-plugin-sort-imports"]
}
2 changes: 2 additions & 0 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"~account/*": ["./src/modules/account/*"],
"~landing/*": ["./src/modules/landing/*"],
"@/*": ["./src/*"]
}
},
Expand Down
2 changes: 2 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ const config = ({ mode }: { mode: string }): UserConfigExport => {
],
resolve: {
alias: {
'~account': resolve(__dirname, 'src/modules/account'),
'~landing': resolve(__dirname, 'src/modules/landing'),
'@': resolve(__dirname, 'src'),
},
},
Expand Down

0 comments on commit 1e1be38

Please sign in to comment.