Respect NODE_PATH environment variable
Created by: tp
I wanted to try out create-react-app
on our internal monorepo, which is basically structured into 2 folders: "apps" and "components".
The "apps" contain just an entry index.js file and their build/transpile configuration and import a root component from the components directory.
This is currently solved by directing imports using NODE_PATH
environment variable to make tools look into the components folder (so that you can write import Button from 'ns-button'
instead of import Button from '../../../components/ns-button
).
Personally I would feel that this would be worthwhile to support so this project could work with a wide variety of "non-standard" project layouts.