Is it planned to add import statements without relative paths (webpack) feature to create-react-app?
You can found info regarding this here and here.
With this we can do
import Header from 'components/Header';
import Grid from 'components/Grid';
import TransactionForm from 'containers/TransactionForm';
import TransactionSummary from 'containers/TransactionSummary';
import * as AppActions from 'actions';
instead of
import Header from '../../components/Header';
import Grid from '../../components/Grid';
import TransactionForm from '../TransactionForm';
import TransactionSummary from '../TransactionSummary';
import * as AppActions from '../../actions';
We will likely support this via #476 but you would have to add the current directory to NODE_PATH
yourself. We want to keep this explicit because it is quite prone to breakage.
Here is an example: https://github.com/reactjs/redux/issues/1681#issuecomment-216508641. We don鈥檛 want people to have issues like this so we won鈥檛 enable it by default.
Most helpful comment
We will likely support this via #476 but you would have to add the current directory to
NODE_PATH
yourself. We want to keep this explicit because it is quite prone to breakage.Here is an example: https://github.com/reactjs/redux/issues/1681#issuecomment-216508641. We don鈥檛 want people to have issues like this so we won鈥檛 enable it by default.