This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
NODE_PATH set in .env doesn't work #119
Closed
Description
Fresh app. Then:
echo NODE_PATH=src > .env
And change src/index.tsx
import App from './App';
to
import App from 'App';
Results in:
./src/index.tsx
(3,17): error TS2307: Cannot find module 'App'.
This is one way to get absolute imports with plain create-react-app
, I tested the same process with that and it builds fine.
The .env
file itself is definitely loaded, since I can set PORT
, for example.
Related:
#98
facebook/create-react-app#741
facebook/create-react-app#1712
(possibly) facebook/create-react-app#2230
Metadata
Metadata
Assignees
Labels
No labels