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.