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

Respect exports mappings in custom imports resolver #216191

Open
delanni opened this issue Mar 27, 2025 · 0 comments
Open

Respect exports mappings in custom imports resolver #216191

delanni opened this issue Mar 27, 2025 · 0 comments
Labels
needs-team Issues missing a team label

Comments

@delanni
Copy link
Contributor

delanni commented Mar 27, 2025

Some packages declare an exports field that prescribes how imported paths should be mapped to real file paths.

This breaks our import resolvers, because we're not respecting any path mapping from there.

As in #215627 for example, we had to create a package-specific mapping for any import to be searched for in the dist folder.

We should devise a bit of generic logic in src/platform/packages/private/kbn-import-resolver/src/import_resolver.ts to parse these exports mappings and instruct the resolver to find the right files.

@botelastic botelastic bot added the needs-team Issues missing a team label label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-team Issues missing a team label
Projects
None yet
Development

No branches or pull requests

1 participant