Skip to content

Commit

Permalink
Remove path resolution from internal forks plugin (#23255)
Browse files Browse the repository at this point in the history
Alternative to #23254

Our build script has a custom plugin to resolve internal module forks.
Currently, it uses require.resolve to resolve the path to a real file
on disk.

Instead, I've updated all the forked module paths to match their
location on disk, relative to the project root, to remove the need to
resolve them in the build script's runtime.

The main motivation is because require.resolve doesn't work with ESM
modules, but aside from that, hardcoding the relative paths is more
predictable — the Node module resolution algorithm is complicated, and
we don't really need its features for this purpose.
  • Loading branch information
acdlite authored Feb 9, 2022
1 parent a3bde79 commit 274b9fb
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 65 deletions.
Loading

0 comments on commit 274b9fb

Please sign in to comment.