Skip to content

fix: code block tabs#163

Merged
dcrawbuck merged 2 commits intomainfrom
dcrawbuck/fix-code-tabs
Apr 8, 2026
Merged

fix: code block tabs#163
dcrawbuck merged 2 commits intomainfrom
dcrawbuck/fix-code-tabs

Conversation

@dcrawbuck
Copy link
Copy Markdown
Collaborator

@dcrawbuck dcrawbuck commented Apr 8, 2026

Alias node:path to pathe in Vite so browser bundles do not crash when the docs runtime touches path helpers. This restores hydration and fixes broken interactive code tabs such as the Objective-C tab on /docs/ios/quickstart/install#import-superwallkit. Validated with bun test, bun run build:cf, and a local agent-browser check on the affected page.


Note

Low Risk
Low risk: only adjusts Vite module resolution and adds a small dependency; main risk is unexpected path-behavior differences in client-side code that imports node:path.

Overview
Restores client-side hydration/interactive docs by preventing node:path from being pulled into the browser bundle.

Adds pathe as a dev dependency and updates vite.config.ts to alias node:path to pathe, avoiding runtime crashes when docs code touches path helpers.

Reviewed by Cursor Bugbot for commit da38f66. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4029b3d. Configure here.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4029b3d63e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 8, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
superwall-docs-staging da38f66 Commit Preview URL

Branch Preview URL
Apr 08 2026, 06:37 PM

@dcrawbuck dcrawbuck changed the title fix: restore docs code tabs fix: code block tabs Apr 8, 2026
@dcrawbuck dcrawbuck merged commit cf37c00 into main Apr 8, 2026
3 checks passed
@dcrawbuck dcrawbuck deleted the dcrawbuck/fix-code-tabs branch April 8, 2026 18:53
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

Successfully merging this pull request may close these issues.

1 participant