es-toolkit icon indicating copy to clipboard operation
es-toolkit copied to clipboard

docs: fix Vercel deployment failures by async loading Sandpack component

Open kangju2000 opened this issue 6 months ago • 2 comments

This PR fixes Vercel deployment failures by implementing async loading for the Sandpack component in our vitepress theme config.

I believe the issue is caused by vitepress-plugin-sandpack's Sandbox component using DOM APIs on the server side. This change ensures Sandpack only loads client-side, preventing SSR-related errors.

We can't verify the fix in this PR as Vercel deployment doesn't run on PRs. We'll need to merge to confirm the solution works.

kangju2000 avatar Aug 08 '24 10:08 kangju2000