Permalink
Browse files

Enable absolute import paths (such as "features/a/SomeComponent")

There's been numerous requests for Create-React-App to support having
imports resolved relative to the "src" folder.  The semi-documented
solution is to have a NODE_PATH environment variable, which will be
used in the resolution process.  It's apparently also possible to
specify that variable in a file named ".env".

References:

facebook/create-react-app#476
facebook/create-react-app#693
facebook/create-react-app#741
  • Loading branch information...
markerikson committed Nov 17, 2016
1 parent 21393ed commit 922292f02182740a5d496d5972439c506f58b7f5
Showing with 1 addition and 1 deletion.
  1. +1 −0 .env
  2. +0 −1 .gitignore
View
1 .env
@@ -0,0 +1 @@
NODE_PATH=src
View
@@ -11,7 +11,6 @@ build
# misc
.DS_Store
.env
npm-debug.log

0 comments on commit 922292f

Please sign in to comment.