We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10bb023 commit cc428dfCopy full SHA for cc428df
packages/core/src/internal/esm/cjsResolve.ts
@@ -177,13 +177,12 @@ function* nodeModulesPaths(path: URL) {
177
return;
178
}
179
do {
180
- // a. if PARTS[I] = "node_modules" CONTINUE
181
- if (path.pathname.endsWith("/node_modules/")) {
182
- continue;
+ // a. if PARTS[I] = "node_modules", GOTO d.
+ if (!path.pathname.endsWith("/node_modules/")) {
+ // b. DIR = path join(PARTS[0 .. I] + "node_modules")
183
+ // c. DIRS = DIR + DIRS
184
+ yield new URL("./node_modules/", path);
185
- // b. DIR = path join(PARTS[0 .. I] + "node_modules")
- yield new URL("./node_modules/", path);
186
- // c. DIRS = DIR + DIRS
187
// d. let I = I - 1
188
path = new URL("../", path);
189
} while (path.pathname !== "/");
packages/core/test/fixtures/@[email protected]
6.01 KB
0 commit comments