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

Absolute imports #63

Open
ludwigmuench opened this issue Nov 25, 2019 · 0 comments
Open

Absolute imports #63

ludwigmuench opened this issue Nov 25, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@ludwigmuench
Copy link
Contributor

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'
@ludwigmuench ludwigmuench added the enhancement New feature or request label Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants