Evan Wallace

Results 542 comments of Evan Wallace

You're correct that there is no AST plugin API. I'm not planning on including one due to the performance impact. However, you shouldn't need one to modify import paths. You...

I can see needing async `setup` to modify build options. I can add that. I have already been planning to add callbacks for `buildStart` and `buildEnd`. I just haven't done...

> My current understanding is that `setup` is invoked multiple times in watch mode That is incorrect. The `setup` function is only run once for the first full build, but...

> any reason why the onResolve of a plugin executed sequentially for every import from one file? The vast majority of source files only have a few imports, so this...

Sorry, this plugin is not under active development. It's only provided as-is and I'm not planning on making any improvements. You are welcome to fork it and add your own...

That's great! Good luck :)

If this is not a bug, then I'm still very confused about how this is supposed to work. I'm trying to reverse-engineer Browserify's logic in https://github.com/evanw/package-json-browser-tests but it seems inconsistent....

Browserify selects `foo_bar.js` and Webpack selects `node_modules/foo/bar.js`. But this still looks like a bug in Browserify to me. The original code is `require('foo/bar')` not `require('./foo/bar')`. In node, `foo/bar` is a...

FYI I am implementing this in [esbuild](https://github.com/evanw/esbuild) in case that's relevant to this issue. I just got an experimental version of it working. Happy to answer any questions about it.

FWIW this is not specific to Yarn. This happens when npm is used instead of Yarn. It looks like this has been esbuild's behavior for quite a while.