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

[Feature][plugin-comp-preview]: combine plugin-preview and plugin-playground into one #1574

Open
SoonIter opened this issue Nov 14, 2024 · 2 comments

Comments

@SoonIter
Copy link
Member

SoonIter commented Nov 14, 2024

What problem does this feature solve?

#1105 (comment)

closes #1452

What does the proposed API look like?

some historical problems need to be solved

  1. support tsx syntax highlight and no type error, closes [Feature]: Support highlighting in tsx code when uses @rspress/plugin-preview #1113

Image

  1. support ```tsx pure ```tsx playground ```tsx preview can be used together
    ```tsx default value should be pure

"playground" should be editable "preview" to reduce the learn cost

  1. style isolated (iframe or shadow-dom), closes [Feature]: The playground plugin requires iframe to isolate the style to avoid style pollution. #1394

  2. multiple files support(optional), closes [Feature]: optimize @rspress/plugin-preview style #1315

@SoonIter
Copy link
Member Author

SoonIter commented Nov 14, 2024

any new design can be accepeted, this would be a new plugin called plugin-comp-preview, and it won't has any relation to plugin-preview and plugin-playground (for no breaking)

@chenjiahan
Copy link
Member

This is worth writing an RFC to explain the new design and what problems it solves.

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

2 participants