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

How to use aliases with etsc ? (like "@controllers/*" to reference files in "./src/controllers") #59

Open
JulesLecuir opened this issue Sep 4, 2024 · 0 comments

Comments

@JulesLecuir
Copy link

Hi,

I would like to use TS paths options:

{
  "compilerOptions": {
    ...
    "paths": {
      "@config/*": ["./src/config/*"],
      "@controllers/*": ["./src/controllers/*"],
      "@helpers/*": ["./src/helpers/*"],
      "@models/*": ["./src/models/*"],
      "@services/*": ["./src/services/*"],
      "@templates/*": ["./src/templates/*"],
      "@utils/*": ["./src/utils/*"]
    }
  },
  ...
}

How can I run etsc so that it recognizes those paths ? For now I get the error:

Error: Cannot find module '@services/logger'

Thanks !

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

1 participant