You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
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
What is this feature?
How would your idea work?
Do you have any examples of how you would like to see us implement it?
The text was updated successfully, but these errors were encountered: