Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): add support for tsconfig wildcard paths #571

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SteveVanOpstal
Copy link

For a large project we use libraries with secondary entry points and map them in our tsconfig.json like this:
"@aztrix/components/*": ["libs/components/*/index.ts"],
It's a neat shorthand and easy way to create more secondary entry points without changing any configuration.
Therefore I've implemented a way to handle these kinds of path mappings.

Kind Regards

Comment on lines +73 to +78
if (!entry.includes('index.ts') && !entry.includes('index.js')) {
continue;
}

const capturedPath = mm.capture(path, entry);
if (!capturedPath) {
Copy link

@John-Pier John-Pier Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know exactly how micromatch works, but...
Angular (ng-packagr) uses "ng-package.json" with lib.entryFile in secondary entry point to define entryFile of the point;
Almost always this is an index.ts file, but it is still worth considering ng-package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants