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 request: create a new package to manage themes #326

Closed
2 tasks
tromika opened this issue Jan 25, 2022 · 0 comments
Closed
2 tasks

Feature request: create a new package to manage themes #326

tromika opened this issue Jan 25, 2022 · 0 comments
Milestone

Comments

@tromika
Copy link
Contributor

tromika commented Jan 25, 2022

Tell us how you think we can improve Sandpack

Problem:

The list of themes supported by Sandpack is going to increase, as we encourage people to create more themes and share them. However, this will lead to an increased bundle size issue, which is not sustainable for a library.

Solution:

Create a new package in the repo (@codesandbox/sandpack-themes) and export all themes from the main package to there. Then Sandpack component could consume the theme directly from the package instead of its own bundler:

import { sandpackDark } from "@codesandbox/sandpack-theme"

<Sandpack theme={sandpackDark} />

Benefits

  • Encourage people to contribute to the themes, without any extra cost;

  • Reduce the bundle size of the main package;

  • Give the ability to other packages consume it (sandpack-vue);

Packages affected

  • sandpack-client
  • sandpack-react

What is this feature?

How would your idea work?

Do you have any examples of how you would like to see us implement it?

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

No branches or pull requests

2 participants