Skip to content

Absolute imports #63

@ludwigmuench

Description

@ludwigmuench

Since create-react-app v3 you can configure your app to use absolute imports (= relative to a top-level folder, e.g. src). I think this would make imports easier to write and more readable.

Example:

// tsconfig.json
{
  "compilerOptions": {
    "baseUrl": "src"
  },
  "include": ["src"]
}// before
import Button from '../../Button/Button'// after
import Button from 'components/Button/Button'

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions