Skip to content

Add vercel.json for default React vite.js template #755

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

Merged
merged 2 commits into from
Jul 31, 2025
Merged

Conversation

wwwillchen
Copy link
Contributor

@wwwillchen wwwillchen commented Jul 31, 2025

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

1 issue found across 1 file • Review in cubic

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

"$schema": "https://openapi.vercel.sh/vercel.json",
"rewrites": [
{
"source": "/(.*)",
Copy link
Contributor

Choose a reason for hiding this comment

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

This rewrite rule will redirect all requests, including static assets, to /index.html, which can break static file serving. Consider excluding requests for files with extensions from the rewrite rule to avoid this issue.

Prompt for AI agents
Address the following comment on scaffold/vercel.json at line 5:

<comment>This rewrite rule will redirect all requests, including static assets, to /index.html, which can break static file serving. Consider excluding requests for files with extensions from the rewrite rule to avoid this issue.</comment>

<file context>
@@ -0,0 +1,9 @@
+{
+  &quot;$schema&quot;: &quot;https://openapi.vercel.sh/vercel.json&quot;,
+  &quot;rewrites&quot;: [
+    {
+      &quot;source&quot;: &quot;/(.*)&quot;,
+      &quot;destination&quot;: &quot;/index.html&quot;
+    }
</file context>
Suggested change
"source": "/(.*)",
"source": "/((?!.*\.[^/]+$).*)",

@wwwillchen wwwillchen changed the title Add vercel.json Add vercel.json for default React vite.js template Jul 31, 2025
@wwwillchen wwwillchen merged commit e5e1495 into main Jul 31, 2025
4 of 5 checks passed
@wwwillchen wwwillchen deleted the add-vercel-json branch July 31, 2025 22:17
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.

[session report] <add title> 2nd page on DYAD website not being published via vercel
1 participant