question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 7 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
gaearoncommented, Jul 1, 2017

You can put NODE_PATH=src in your .env file.

1reaction
gaearoncommented, Feb 21, 2017

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found