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

Fixes #741 
See: https://vercel.com/docs/project-configuration#rewrites-examples
This commit is contained in:
Will Chen
2025-07-31 15:17:47 -07:00
committed by GitHub
parent 7938b69eca
commit e5e1495c57
18 changed files with 140 additions and 2 deletions

View File

@@ -401,6 +401,11 @@
"content": "// File contents excluded from context",
"force": false
},
{
"path": "vercel.json",
"content": "{\n \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n \"rewrites\": [\n {\n \"source\": \"/(.*)\",\n \"destination\": \"/index.html\"\n }\n ]\n}\n",
"force": false
},
{
"path": "vite.config.ts",
"content": "import { defineConfig } from \"vite\";\nimport dyadComponentTagger from \"@dyad-sh/react-vite-component-tagger\";\nimport react from \"@vitejs/plugin-react-swc\";\nimport path from \"path\";\n\nexport default defineConfig(() => ({\n server: {\n host: \"::\",\n port: 8080,\n },\n plugins: [dyadComponentTagger(), react()],\n resolve: {\n alias: {\n \"@\": path.resolve(__dirname, \"./src\"),\n },\n },\n}));\n",