Skip to content

Absolute imports #63

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'

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions