chore: update vercel.json for new /docs routing and set base path in vite.config.ts and router.tsx
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
{
|
{
|
||||||
"rewrites": [
|
"rewrites": [
|
||||||
|
{
|
||||||
|
"source": "/docs",
|
||||||
|
"destination": "https://ciodocs.vercel.app/docs"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"source": "/docs/:path*",
|
"source": "/docs/:path*",
|
||||||
"destination": "https://ciodocs.vercel.app/:path*"
|
"destination": "https://ciodocs.vercel.app/docs/:path*"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { routeTree } from './routeTree.gen';
|
|||||||
|
|
||||||
export function getRouter() {
|
export function getRouter() {
|
||||||
return createTanStackRouter({
|
return createTanStackRouter({
|
||||||
|
basepath: '/docs',
|
||||||
defaultNotFoundComponent: NotFound,
|
defaultNotFoundComponent: NotFound,
|
||||||
defaultPreload: 'intent',
|
defaultPreload: 'intent',
|
||||||
routeTree,
|
routeTree,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { tanstackStart } from '@tanstack/react-start/plugin/vite';
|
|||||||
import tsConfigPaths from 'vite-tsconfig-paths';
|
import tsConfigPaths from 'vite-tsconfig-paths';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: '/docs/',
|
||||||
server: {
|
server: {
|
||||||
port: 3000
|
port: 3000
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user