-
-
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
Can I custom modulesDirectories
?
#1591
Comments
See my reply in #1607 (comment). |
The two issues mentioned above cover resolve.root (absolute path) configuration rather than resolve.modulesDirectories (hierarchal modules folders). Any suggestions on how to achieve this without ejecting or having node_modules folders all over the place? |
If you want arbitrary folders to have the same behavior as |
10-4. Thanks. |
@gaearon How about add another environment variable like |
I don’t think we’ll do that. We don’t want to significantly deviate from Node resolution algorithm. Instead we’d want to push the ecosystem towards solutions that work well within it. |
Yeah there are many hacky ways for typing less when requiring local module, guess we need to stick with those. But I'm wondering what is your recommended solution to require component from deeply nested module? *) Maybe the solution could be places in User Guide section, so there are no more similar issue |
You can put |
@gaearon cool! |
├── src
│ ├── App.js
│ ├── assets
│ │ └── logo.png
│ ├── components
│ │ ├── Counter.js
│ │ ├── Hello.js
│ │ └── Todo.js
│ ├── main.js
│ └── router
│ └── index.js
I just want to write like this to import componets in
App.js
:(It's good for deep nested folder to import components.)
not
I don't want to run eject, thank you !
The text was updated successfully, but these errors were encountered: