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

fix package resolution #205

Merged
merged 1 commit into from Feb 9, 2023
Merged

fix package resolution #205

merged 1 commit into from Feb 9, 2023

Conversation

Rich-Harris
Copy link
Member

I'm not sure what the story is with #198 but it didn't work, because the get_dir function was called inside the catch block which defeats the object.

This PR takes a much simpler approach — it just walks up the tree looking for node_modules/<name>/package.json. Crude, but should work in all the cases we care about (it doesn't need to reimplement the entire Node module resolution algo, it just needs to find libraries with a pkg.svelte).

I assume we also need to respect the svelte export condition, but that seems like something that should happen separately.

@dummdidumm
Copy link
Member

dummdidumm commented Feb 9, 2023

From https://github.com/sveltejs/rollup-plugin-svelte#svelte-exports-condition it sounds like the exports condition is already covered

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.

None yet

2 participants