This repository was archived by the owner on Jan 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 489
NODE_PATH set in .env doesn't work #119
Comments
It seems typescript doesn't support the Putting my local modules under |
I solved this issue by forking this repository, and update the webpack config. Just add
So that you don't need to eject, just keep your fork in sync time to time. Hope that helps :-) |
@zhenwenc So far as I can tell that achieves the same result as setting NODE_PATH=src in the .env file. I still don't have a solution, btw... putting code in |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Fresh app. Then:
And change
src/index.tsx
to
Results in:
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 setPORT
, for example.Related:
#98
facebook/create-react-app#741
facebook/create-react-app#1712
(possibly) facebook/create-react-app#2230
The text was updated successfully, but these errors were encountered: