Skip to content

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.

3 participants