remix-esbuild-override icon indicating copy to clipboard operation
remix-esbuild-override copied to clipboard

alternative solution by patching @remix-run/dev

Open repository opened this issue 1 year ago • 0 comments

Hi, I was previously using your package to modify the eslint config in my project, but I had issues with getting it to work reliably. Sometimes it worked, other times it didn't at all. I am in a somewhat complex environment (monorepo w/ pnpm workspaces), so I think that may be part of the issue.

I tried looking at other issues people had and debugging the issue myself, but was not successful. The defineProperty was being run properly and everything, but the override function did not run. So, I came up with another (and hopefully more reliable) solution by patching the @remix-run/dev package directly using pnpm patch.

https://gist.github.com/repository/c92c99e097dec0d33c97c9e8b8cb17bc

And it's used like this: image

I don't know how, or even if, it can be implemented as an npm package, but I hope you are able to find some use out of it.

repository avatar Mar 30 '23 09:03 repository