How do I configure absolute paths for imports in TypeScript based React Native apps?

In order to avoid ‘../../../../’ style relative imports in a TypeScript based React Native app, I would like to configure the app so that I can use absolute imports instead.

It is important that the configuration also supports Jest unit tests.

I created the app using npx react-native init MyTestApp --template typescript

React Native version: 0.60.5

What is the exact configuration I would need to achieve this?

186 thoughts on “How do I configure absolute paths for imports in TypeScript based React Native apps?”

  1. Hiya! I know this is kinda off topic nevertheless
    I’d figured I’d ask. Would you be interested in exchanging
    links or maybe guest writing a blog article or vice-versa?
    My site goes over a lot of the same topics as yours and
    I believe we could greatly benefit from each other.
    If you’re interested feel free to shoot me an email. I look forward to hearing from you!

    Superb blog by the way!

  2. Pingback: cialis best price
  3. Pingback: viagra online
  4. Pingback: viagra for sale
  5. Pingback: sildenafil online
  6. Pingback: order viagra
  7. Pingback: viagra cheap
  8. Pingback: sildenafil nz buy
  9. Pingback: cheap viagra
  10. Pingback: buy cialis cheap
  11. Pingback: cialis black
  12. Pingback: viagras
  13. Pingback: sildenafil 100mg
  14. Pingback: ivermectin virus
  15. Pingback: walgreens viagra
  16. Pingback: viagra cost usa
  17. Pingback: cvs viagra
  18. Pingback: taking viagra
  19. Pingback: sildenafil citrate
  20. Pingback: viagra and cialis
  21. Pingback: viagra for women
  22. Pingback: hims viagra

Leave a Comment