diegohaz / arc

React starter kit based on Atomic Design

Home Page:https://arc.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about how 'components' is exported in the example project

frednomoon opened this issue · comments

I have found it very interesting reading about the Atomic Design concept here, but my interest has also been picqued, by the manner in which components are being imported in the example project.

I noticed that, assuming this is not a typo or some kind of shorthard, the components folder seems to have been mapped to the components keyword so that the relative path to the folder is no longer required i.e.
import { Input, Label, Field, HomePage, PageTemplate } from 'components'

Have been digging around a bit and can't understand how this is able to work, could someone please enlighten me? I cannot begin to explain how useful this will be in my other projects!

nvm i figured it out....
using this for anyone elses reference: https://github.com/tleunen/babel-plugin-module-resolver