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

resolve.alias for internal dependencies does not work when src/index.{js,ts} isn't present #23

Open
ext opened this issue Oct 2, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ext
Copy link
Contributor

ext commented Oct 2, 2024

resolve.alias is automatically configured to setup resolve.alias to map internal monorepo packages to it's src/index.{js,ts} but this breaks down when the file does not exist and when main points to a different file.

Example:

"main": "src/theme.scss"

This will be resolvable when using the actual package but not when importing it with Vite (using this config).

Unsure if this mapping is actually needed or if it can be removed altogether, if still needed the mapping should be more intelligent preferably by understanding both subpackage exports from exports and fields such as main.

@ext ext added bug Something isn't working help wanted Extra attention is needed labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant