Open hbarcelos opened 5 years ago
Your config is in config, but it’s pointed at build. If that’s correct, do you need to run your build process first?
I'm sorry, I was typing by hand and got it wrong. The file is in the build
directory.
Fixed the description.
No, I don't need to run my build process before eslint.
Can you include your webpack config? Something in it is silently adding the esm
, for example, so it's possible that the "module" field is interfering somehow.
My configuration file is quite large, don't want you to waste your time looking through it. I'll try to extract a subset of it and see if I can reproduce the error.
Sorry for the delay, but I managed to create a minimal repo to reproduce the problem:
https://github.com/hbarcelos/webpack-resolver-issue
Steps to reproduce are in the README.
In my
.eslintrc
, I have:In
build/webpack.base.conf.js
, I have:My code import is like:
Looks like for some reason this plugin is interfering with
date-fns
module resolution. When I try to runeslint
on the repository, I get he following error:Problem still persists if I import the named function from the main package:
Webpack build works normally as expected.