It would be fantastic to have the ability to configure what "mainFields" to resolve similar to webpack.
Right now I have a main field that points to lib/index.js. The lib directory is used when I publish to npm. However, internal to my monorepo I transpile my node_modules by using the module key in package.json. The key points to src/index.js.
Hi all!
It would be fantastic to have the ability to configure what "mainFields" to resolve similar to webpack.
Right now I have a main field that points to
lib/index.js
. The lib directory is used when I publish to npm. However, internal to my monorepo I transpile my node_modules by using themodule
key inpackage.json
. The key points tosrc/index.js
.The code in question is here: https://github.com/lodash/babel-plugin-lodash/blob/3f9c8e48ba66ed68132f7c1ef40b5e1e4c466d6c/src/ModuleCache.js#L19-L21
Happy to provide additional context!