Can I custom `modulesDirectories` ?
See original GitHub issue├── 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.)
import Todo from 'components/Todo'
not
import Todo from './components/Todo'
I don’t want to run eject, thank you !
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
mocha+chai+jsdom-Can't load custom modules Directories
I solved it, we can define custom module path with using app-module-path package. install npm install app-module-path --save.
Read more >Resolve | webpack
Configure how modules are resolved. For example, when calling import 'lodash' in ES2015, the resolve options can change where webpack goes to look...
Read more >module-alias - npm
Create aliases of directories and register custom module paths. Latest version: 2.2.2, ... Just create an alias and do it the right way:....
Read more >Adding external modules directories in JBoss EAP 6/7
How can the classpath be extended to deployed content reference directories and files external to the installation? Set the custom module ...
Read more >Applying a custom filter when opening a drawer. - SugarClub
directories and my filter definitions in ./custom/Extension/modules/... directories, which works but was a mistake. I've now united them with each other so that ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can put
NODE_PATH=src
in your.env
file.See my reply in https://github.com/facebookincubator/create-react-app/issues/1607#issuecomment-281453033. Please search past issues before creating a new one. Thank you!