-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Solving the ../../../
problem.
#3523
Comments
Well, you can create a .env file on the root of your project and make the NODE_PATH point to the src folder (or wherever you have your code) all you'll have to do is write:
CRA will read your .env file without ejecting. |
@Timer Was this closed because using |
Is there a reason why |
Until CRA supports providing alias, I'm going with with adding an symlink inside "postinstall": "ln -sf ../src node_modules/@" |
Is it possible to support importing local modules relative to the root directory (or something along those lines) without ejecting? In other words, go from this:
to this:
I have done this before with create-react-native-app after ejecting by using the babel-plugin-module-resolver.
This can also be accomplished using Webpack aliases.
The text was updated successfully, but these errors were encountered: