Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: project path support. #2557

Closed
meChrisReed opened this issue Jun 17, 2017 · 2 comments
Closed

Feature: project path support. #2557

meChrisReed opened this issue Jun 17, 2017 · 2 comments

Comments

@meChrisReed
Copy link

Using project paths make refactoring as your project scales much easier. I would like to add "src" and "public" to the paths searched with import statements.

In the configuration files of react-scripts.

@viankakrisna
Copy link
Contributor

it's already supported (but not documented) feature for ./src via NODE_PATH=src in ./env or putting your code in src/node_modules
#1065

@Timer
Copy link
Contributor

Timer commented Jun 18, 2017

Yup! Per @viankakrisna's comment, you can set NODE_PATH=src in your .env file to achieve this effect.
We do not allow importing from outside of src/ so there is no need for supporting other locations as well (e.g. public/).

Let us know if you need help with anything else.

@Timer Timer closed this as completed Jun 18, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants