Thursday, 8 June 2017

Is it possible to change the module lookup path for React Native?

I want to, e.g, have require('foo/bar') be able to find myProjectRoot/src/foo/bar.

  • Webpack has resolve
  • Jest has moduleDirectories
  • Ordinary Node.js has app-module-path

I was hoping the latter would Just Work with React Native, but it Doesn't. Is it possible some other way?



via lawrence

No comments:

Post a Comment