Better support for import Astro components from third party packages #214
CallMeLaNN
started this conversation in
Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice if Astro document/standardize
I know it sounds like straight forward, but I struggle either to use third party Astro components, to fix it or to create one myself.
Currently I go through some themes and integrations to find the way how to do that using latest
[email protected]
. This is what I found:Themes is just a starter, not as import. So I look into some of it to find the example. I found Accessible Astro Starter contain how to import accessible-astro-components but crashed when I import and view. This could be different issue but I don't have problem if I copy the component.
astro-seo source seems fine, but I got standard TypeScript
Cannot find module 'astro-seo' or its corresponding type declarations.ts(2307)
when I import it. This is where I have to declare the module as any and no Props TypeScript support. I couldn't find a way to fix this package.However if I copy those Astro components from both of above, it works just fine. I think this is related to
main
orexports
in thepackage.json
and internal mechanic of Astro/Vite/etc import that.I tried
@astro/prism
andCode
fromastro/components
. The Props type seems fine and type checked. That's weird.Beta Was this translation helpful? Give feedback.
All reactions