Skip to content

How to use path aliases? #202

Description

@sarat1669

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';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions