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 path aliases? #202

Open
sarat1669 opened this issue Sep 8, 2023 · 1 comment
Open

How to use path aliases? #202

sarat1669 opened this issue Sep 8, 2023 · 1 comment

Comments

@sarat1669
Copy link

Current Behavior

tsconfig.json path aliases are not working

Desired Behavior

Path aliases to work

Who does this impact? Who is this for?

People who want to avoid ../../../ hell

Describe alternatives you've considered

Tried solution mentioned in tsdx issues
jaredpalmer#379 (comment)

Additional context

tsconfig.json
{
  ...
  "compilerOptions": {
    "jsx": "react-jsx",
    "esModuleInterop": true,
    "paths": {
      "@uikit/*": ["./src/uikit/*"],
      ...
    }
  }
  ...
}
dist/elemason.esm.js
import { Box as Box$2 } from '@uikit/components';
✘ [ERROR] Could not resolve "@uikit/components"

    ../repositories/elemason/dist/elemason.esm.js:11:1047:
      11 │ ...ent, TextArea as TextArea$2, ToastRoot } from '@uikit/components';
@ribastudio
Copy link

i have the same error

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

2 participants