I’m updating the article now, because I’m also using Webpack aliases now, so I am seeing this error, and the fix is different now in April 2020.

Install:

npm install --save-dev eslint-import-resolver-alias

Laravel-mix (aka Webpack config)

mix.webpackConfig({
resolve: {
extensions: ['.js', '.vue'],
alias: {
'@': `${__dirname}/resources`,
},
},
});

.eslintrc.json

"settings": {
"import/resolver": {
"alias": {
"map": [
["@", "./resources"]
],
"extensions": [".js", ".vue"]
}
}
}

source: https://github.com/benmosher/eslint-plugin-import/issues/496

This has fixed it in mine, today.

I prefer to work near ES6+, node.js, microservices, Neo4j, React, React Native; I compose functions and avoid classes unless private state is desired.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Mackintosh

I prefer to work near ES6+, node.js, microservices, Neo4j, React, React Native; I compose functions and avoid classes unless private state is desired.