Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow /index.html in sandboxes to fix forks on CodeSandbox #7430

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Jan 14, 2025

Forks on CodeSandbox will ignore /index.html and create their own public/index.html which leads to broken sandboxes in CodeSandbox.

Compare a forked sandbox from main vs forked sandbox from this branch

We now throw if /index.html is used and only use public/index.html throughout the codebase which works both in Sandpack and CodeSandbox.

This also means we're consistent. Some sandboxes were already using the functioning public/index.html e.g. https://react.dev/reference/react-dom/client/hydrateRoot#hydrating-server-rendered-html.

Forks on CodeSandbox will ignore `/index.html` and create their own `public/index.html` which leads to broken sandboxes in CodeSandbox.

We now throw if `/index.html` is used and only use `public/index.html` which works both in Sandpack and CodeSandbox.

This also means we're consistent. Some sandboxes were already using the functioning `public/index.html`.
Copy link

vercel bot commented Jan 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
19-react-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 4:00pm
react-dev ✅ Ready (Inspect) Visit Preview Jan 14, 2025 4:00pm

Copy link

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 110.38 KB (🟡 +2 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

@eps1lon eps1lon requested a review from rickhanlonii January 14, 2025 16:09
@eps1lon eps1lon merged commit ee8a829 into reactjs:main Jan 14, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants