Skip to content

Commit

Permalink
chore: patch enhanced-resolve to properly discover the pnp api for th…
Browse files Browse the repository at this point in the history
…e yarn_v3.1.1_pnp_spec.ts system test. see webpack/enhanced-resolve#263 for more details
  • Loading branch information
AtofStryker committed Aug 1, 2023
1 parent 0a8d5d1 commit ea47cf6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/enhanced-resolve+5.15.0.dev.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/enhanced-resolve/lib/ResolverFactory.js b/node_modules/enhanced-resolve/lib/ResolverFactory.js
index 037567b..bddd449 100644
--- a/node_modules/enhanced-resolve/lib/ResolverFactory.js
+++ b/node_modules/enhanced-resolve/lib/ResolverFactory.js
@@ -126,7 +126,7 @@ function processPnpApiOption(option) {
/** @type {NodeJS.ProcessVersions & {pnp: string}} */ versions.pnp
) {
// @ts-ignore
- return require("pnpapi"); // eslint-disable-line node/no-missing-require
+ require('module').findPnpApi(process.cwd()) // eslint-disable-line node/no-missing-require
}

return option || null;

0 comments on commit ea47cf6

Please sign in to comment.