Skip to content

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