Skip to content
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

ES6 Import Statement Without Relative Paths #505

Closed
cguedes opened this issue Aug 27, 2016 · 1 comment
Closed

ES6 Import Statement Without Relative Paths #505

cguedes opened this issue Aug 27, 2016 · 1 comment

Comments

@cguedes
Copy link

cguedes commented Aug 27, 2016

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';
@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2016

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: reduxjs/redux#1681 (comment). We don’t want people to have issues like this so we won’t enable it by default.

@gaearon gaearon closed this as completed Aug 27, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants