Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
"build:site": "pnpm --filter '@tabmesh/playground^...' build && pnpm --filter @tabmesh/playground build && pnpm docs:build && mkdir -p docs/.vitepress/dist/playground && cp -R packages/playground/dist/. docs/.vitepress/dist/playground/",
"biome:check": "biome check .",
"biome:fix": "biome check --apply .",
"biome:ci": "biome ci .",
Expand Down
9 changes: 7 additions & 2 deletions packages/playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';

export default defineConfig({
// In production the playground is served from tabmesh.dev/playground/ (the
// docs site iframes it). Dev keeps base `/` so the existing Playwright
// e2e suite, which hits the Vite dev server at http://localhost:5173/,
// is unaffected.
export default defineConfig(({ command }) => ({
plugins: [react()],
base: command === 'build' ? '/playground/' : '/',
server: {
port: 5173,
},
});
}));
9 changes: 9 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"buildCommand": "pnpm run build:site",
"installCommand": "pnpm install --frozen-lockfile",
"outputDirectory": "docs/.vitepress/dist",
"framework": null,
"cleanUrls": true,
"trailingSlash": false
}
Loading