lodash / babel-plugin-lodash

Modular Lodash builds without the hassle.
Other
1.96k stars 92 forks source link

Breaks with `yarn link`ed dependencies #183

Closed danny-andrews closed 6 years ago

danny-andrews commented 6 years ago

package.json:

{
  "dependencies": {
    "linked-dep": "link:../../../../linked-dep",
  }
}

import-and-use-linked-dep.js:

import { TestComponent } from 'linked-dep'; // Is not transformed

After some digging, it appears that Module._resolvefilename does not resolve modules which have been yarn linked: https://github.com/lodash/babel-plugin-lodash/blob/master/src/ModuleCache.js#L41.

danny-andrews commented 6 years ago

Nvm, I just had main pointed to a file that didn't exist. Sorry for the noise.