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

Doesn't work with wildcard import paths #2

Open
dwjft opened this issue Nov 2, 2018 · 3 comments
Open

Doesn't work with wildcard import paths #2

dwjft opened this issue Nov 2, 2018 · 3 comments

Comments

@dwjft
Copy link

dwjft commented Nov 2, 2018

Consider:

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

It totally skips over the "*" setting.

@pineapplemachine
Copy link

That actually looks like sensible behavior to me. That would match literally every import, I believe. Your fs import would be rewritten as ./src/fs. Your react import would be rewritten as ./src/react.

@dwjft
Copy link
Author

dwjft commented Nov 8, 2018

TS is smart enough to re-write wildcard imports so this library should do the same.

@joonhocho joonhocho reopened this Nov 8, 2018
@joonhocho
Copy link
Owner

Yeah it would be great to support it. could you make a PR?

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

3 participants