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

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

Closed
frednomoon opened this issue Nov 23, 2018 · 1 comment
Closed

Comments

@frednomoon
Copy link

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!

@frednomoon
Copy link
Author

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

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

No branches or pull requests

1 participant