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

Storybook should support to load .astro component #18963

Closed
ningo-agilityio opened this issue Aug 19, 2022 · 3 comments
Closed

Storybook should support to load .astro component #18963

ningo-agilityio opened this issue Aug 19, 2022 · 3 comments

Comments

@ningo-agilityio
Copy link

Hi Storybook team,
I'm writing to request a feature that can load .astro component along with Storybook.
When I try to load it, even if I transferred to a React component, it doesn't accept code fence syntax ---.
Do you think it is ok to support this?
I'm looking forward to your feedback soon.
Thanks.

@nickmccurdy
Copy link

nickmccurdy commented Sep 21, 2022

It would be great to support .astro components too, so I don't have to use a frontend framework to take advantage of Astro components in Storybook. It uses Vite internally, so we may be able to write a plugin or fork using the Vite builder.

@IanVS
Copy link
Member

IanVS commented Sep 22, 2022

I agree this would be really cool. It's something that @jonathantneal was talking about a while back as well.

If I understand correctly, we'd need to create a new renderer for Astro that uses Astro's compiler to turn .astro files into a .ts file with a default export. Then the easy part is creating a new framework that connects up that renderer with the vite builder, and any other config that's needed. You can take a look at existing examples in /code/renderers and /code/frameworks to see what those look like for other projects.

Is anyone willing to take this on and give it a shot?

@fxsalazar
Copy link

This should be closed in favor of #18356

@IanVS IanVS closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants