Closed elliotwaite closed 3 years ago
Thanks for reporting, but could you check if the title is correct? Support for node modules is ATM incomplete and I'm guessing this is the real issue here. Importing project's components should work.
Ah, if node modules aren't supported yet, that's probably the issue.
I'm not sure what you mean by checking if the title is correct. Can you clarify? The title of this GitHub issue, or the name of the imported component, or something else?
Also, I'm not sure if this is related, but the DrawerTitle
component that I'm importing in the video demo is a component I'm developing for an NPM package, so it exists in two locations: in node_modules/@svelte-material/drawer
(the node modules path) and in packages/drawer
(the development path). And the node_modules/@svelte-material/drawer
path just aliases to the packages/drawer
path to allow for seamless development.
I'll have to check back in when node modules support is added to see if it also works for my dual location use case.
Thanks for your efforts.
Happy to help :)
I mean title of the GitHub issue. It says that named imports are problematic but I think we now agree that it's related to import path/node_modules and named imports work okay outside of that. I'd like you to check if that is in fact true or maybe there is another bug, and update title to match.
I'll have to check back in when node modules support is added to see if it also works for my dual location use case.
That would be great! It could be related but I don't have enough info right now to verify your situation with two locations. Anyway I hope node_modules fix will also help with that.
Ah, got it. Updated the title.
I just tested it and was still getting errors when the components were outside of the node_modules
dir, but I think it's mainly an issue with the plugin not being able to find named exports. But I think adding node modules support will also cover making named exports work in general.
Great, thanks.
Auto import will duplicate an already imported named import.
Here's a video demo: https://youtu.be/mrJlFoHUUkk (deleted)
It would also be nice if there was an option to disable auto imports.