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

Not using webpack config to resolve #537

Closed
stevenmusumeche opened this issue Aug 30, 2016 · 3 comments
Closed

Not using webpack config to resolve #537

stevenmusumeche opened this issue Aug 30, 2016 · 3 comments

Comments

@stevenmusumeche
Copy link

My webpack config works and the modules are correctly resolved in my build process. However, ESLint is reporting import-no-unresolved errors for my packages, for example Unable to resolve path to module 'redux'

This occurs when I added the following config to my .eslintrc file:

"settings": {
    "import/resolver": {
        "webpack": {
            "config": "./webpack/prod.js"
        }
    }
},

(My webpack config is stored in ./webpack/prod.js)

@benmosher
Copy link
Member

Have you installed he Webpack resolver package?

@stevenmusumeche
Copy link
Author

Yes, "eslint-import-resolver-webpack": "0.5.1". I actually solved the issue late last night. The webpack config file uses ES6 and this package was unable to use it until I changed all the code to ES5. Any way around that?

@benmosher
Copy link
Member

One way is to name it webpack.config.babel.js.

How is Webpack using it? Assuming your Node version can handle all the syntax, this plugin should understand it, as well.

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

No branches or pull requests

2 participants