Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Relative path to differanciate between importing files vs node modules ? #84

Closed
smontlouis opened this issue Sep 13, 2015 · 3 comments
Closed

Comments

@smontlouis
Copy link
Contributor

Would it not be better to know which one come from app ?

import React        from 'react';
import { Provider } from 'react-redux';
import { Router }   from 'react-router';
import routes       from 'routes';
import invariant    from 'invariant';
import { RoutingContext } from 'react-router';
import { createDevToolsWindow } from 'utils';
import { DevTools, LogMonitor, DebugPanel } from 'redux-devtools/lib/react';

vs

import React        from 'react';
import { Provider } from 'react-redux';
import { Router }   from 'react-router';
import routes       from './routes';
import invariant    from 'invariant';
import { RoutingContext } from 'react-router';
import { createDevToolsWindow } from './utils';
import { DevTools, LogMonitor, DebugPanel } from 'redux-devtools/lib/react';
@dvdzkwsk
Copy link
Owner

Very good point. Do you think this is a problem with aliases in general, or specifically that it should just be more explicit when requiring a base folder (as in routes and utils)? Will definitely update at least these and the stores reference.

@smontlouis
Copy link
Contributor Author

I think that aliases are awesome !

In fact, I didn't know you could do that til tonight :). But still something should be done to differranciate modules from base folders.

Maybe an underscore, or just a point ? Meh. Dunno :/

@dvdzkwsk
Copy link
Owner

I updated the ones you pointed out as well as a couple others. I don't know if there's a great solution other than people familiarizing themselves with the project structure :/. Closed with #87.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants