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

Working with relative imports using 'resolve' #24

Closed
adamkleingit opened this issue Feb 2, 2016 · 1 comment
Closed

Working with relative imports using 'resolve' #24

adamkleingit opened this issue Feb 2, 2016 · 1 comment

Comments

@adamkleingit
Copy link

When working with webpack, we use resolve, as such:

  resolve: {
    // Enable resolving modules relative to these paths
    root: [path.join(__dirname, 'lib')],
  }

Then import files like so:
import state from 'api/state';

The problem is that npm-install-webpack-plugin tries to install the node module called api.

I would suggest only installing files that webpack can't resolve (maybe there's a hook for that?).

@ericclemmons
Copy link
Member

I do the same thing, and this is already tracked here #17.

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

2 participants