Adam Mackintosh
1 min readApr 2, 2020

--

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.

--

--

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.