es-toolkit
es-toolkit copied to clipboard
docs: fix Vercel deployment failures by async loading Sandpack component
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.