My webpack configurations is
// config.js
export webpackCommon = {
// ...,
resolve: {
root: srcPath, // it's /src directory path
extensions: ['', '.jsx', '.json', '.js'],
},
externals: [
/^\.\/assets\.json$/,
fs.readdirSync(modulePath).filter(x => x !== '.bin'),
],
// ...,
};
// config.es5.js
require('babel-register');
require('babel-polyfill');
module.exports = require('./config').webpackCommon;
My eslintrc setting is:
"settings": {
"import/resolver": {
"webpack": {
"config": "./tools/conifg.es5.js"
}
}
}
OS: OSX El Cap latest
this plugin can't resolve ./assets.json

and root path modules as below:
There's two directories
In component A, it can resolve component B as import B from 'component/B; but it doesn't work.
From your .eslintrc:
"config": "./tools/conifg.es5.js"
is that a typo in the issue or a typo in your config?
@benmosher that's my configuration.
So what happens if you update 'conifg' to 'config'?
@benmosher I can't get what you mean.
Your Webpack config path is misspelled in the resolver config.
@benmosher The path is correct. because I can reference the es5 configurations through using node-cli like:
console.log(require('./tools/config.es5.js'));
the configuration files are placed at <Project Root>/tools.
I get that, but "config" is misspelled as "conifg" in the eslintrc you pasted.
Wow... awesome... I couldn't find out... Thank you. This issue can be closed.
Thus #300. No worries. 馃槑
Most helpful comment
Thus #300. No worries. 馃槑