diegohaz / arc

React starter kit based on Atomic Design
https://arc.js.org
2.92k stars 292 forks source link

[idea] Change components import logic #209

Closed kybarg closed 7 years ago

kybarg commented 7 years ago

Developing app with arc is very fast cause of simple import logic

import { Some component } from 'components'

But we lose much advantages of classic import like "intellisense" autocomplete and fast navigation in modern editors where you can just click on variable and it navigates to source code. So what if we could keep classic way of import and still the same speed of development with help of some task runner (gulp, grunt, etc.) which could scan folders for components and write them to index.js in components folder then we could import components as simple as and have all the advantages

import { Some component } from '../../components'
diegohaz commented 7 years ago

You can solve it with plugins. I simply use https://github.com/sergiirocks/vscode-ext-node-module-resolve and configure it this way: image

There should be alternatives for other editors as well.

kybarg commented 7 years ago

@diegohaz thanks a lot