I'm currently importing a yarn workspace package that has the module
field defined in ES6 and linting with the plugin eslint-plugin-import
My create-react-app setup automatically uses the module
through webpack but eslint is complaining that @mycompany/utils
package is undefined.
Unable to resolve path to module '@mycompany/utils'. [import/no-unresolved]
So my question is how do I get my linter to look at the
module
path instead ofmain
This is my package.json for the utils package
{
"name": "@mycompany/utils",
"version": "0.0.2",
"main": "dist/index.js",
"module": "src/index.js"
}