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
Currently sandpack provided a SANDPACK_BARE_COMPONENTS env variable to remove default style generated by stitches, but the syntax seems not work in most cases.
for most client cases typeof process will be undefined because build tools like webpack will directly replace process.env.xxx instead of expose a process object to global. So this will always not work on client side.
Besides the name of the function getNodeProcess seems designed for only work on node process?
This env variable should work at build time so it should be fine with Nextjs🤔, but if I disable SSR for some page it still not work. Need to look deep to find the reason.
As this demo shows, nextjs will build code into to version, one for client side and one for server side, the server side build work fine with the env variable but the client build not.
Tell us how you think we can improve Sandpack
Currently sandpack provided a
SANDPACK_BARE_COMPONENTS
env variable to remove default style generated by stitches, but the syntax seems not work in most cases.for most client cases
typeof process
will beundefined
because build tools like webpack will directly replaceprocess.env.xxx
instead of expose aprocess
object to global. So this will always not work on client side.Besides the name of the function
getNodeProcess
seems designed for only work on node process?Packages affected
What is this feature?
Support remove default style on client side.
How would your idea work?
Just use
And in case to support some meta framework like next, maybe we can use:
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: