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

(JSX) importing deeply nested relative paths #388

Closed
HarveyAtwal opened this issue Aug 7, 2016 · 2 comments
Closed

(JSX) importing deeply nested relative paths #388

HarveyAtwal opened this issue Aug 7, 2016 · 2 comments

Comments

@HarveyAtwal
Copy link

I'm noticing a maintenance issue with importing relative paths that go up two or more levels, for example: import Button from '../../elements/button.js'.

How are other developers solving this issue? Would it be possible to base the path on the src directory?

@HarveyAtwal
Copy link
Author

I believe this can be resolved by adding a root attribute to the resolve object in the webpack config:

  resolve: {
    root: paths.appSrc,
    ...
  },

@gaearon
Copy link
Contributor

gaearon commented Aug 7, 2016

Please see discussion in #253.

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