Skip to content
Discussion options

You must be logged in to vote

I'd suggest a structure like this:

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

This prevents any ambiguity, and requires you perform absolute imports as so:

@/components/abc

You'll know immediately if an import is for a npm module or absolute import, also, there's no namespace collisions with this approach.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Timer
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants