Skip to content

Commit

Permalink
Merge pull request #353 from bvanjoi/wildcards-pattern-with-common-su…
Browse files Browse the repository at this point in the history
…ffix

support wildcards pattern with common suffix in imports/exports field
  • Loading branch information
TheLarkInn committed Apr 19, 2023
2 parents d4fb512 + 91edec1 commit cbe4aad
Show file tree
Hide file tree
Showing 17 changed files with 620 additions and 205 deletions.
335 changes: 130 additions & 205 deletions lib/util/entrypoints.js

Large diffs are not rendered by default.

459 changes: 459 additions & 0 deletions test/exportsField.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions test/fixtures/imports-exports-wildcard/node_modules/m/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
13 changes: 13 additions & 0 deletions test/importsField.js
Expand Up @@ -1357,4 +1357,17 @@ describe("ImportsFieldPlugin", () => {
}
);
});

it("should resolve with wildcard pattern", done => {
const fixture = path.resolve(
__dirname,
"./fixtures/imports-exports-wildcard/node_modules/m/"
);
resolver.resolve({}, fixture, "#internal/i.js", {}, (err, result) => {
if (err) return done(err);
if (!result) throw new Error("No result");
result.should.equal(path.resolve(fixture, "./src/internal/i.js"));
done();
});
});
});

0 comments on commit cbe4aad

Please sign in to comment.