Skip to content

Commit ce88cca

Browse files
committed
chore: add Netlify and Vercel deployment configurations
1 parent 19cce4c commit ce88cca

4 files changed

Lines changed: 60 additions & 0 deletions

File tree

apps/viewer/netlify.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Netlify configuration file inside apps/viewer
2+
# Reference: https://docs.netlify.com/configure-builds/file-based-configuration/
3+
4+
[build]
5+
# Build command to run. Since Netlify handles workspace dependency resolution,
6+
# we specify our specific app target build filter.
7+
command = "pnpm --filter hdmap-viewer build"
8+
9+
# Directory containing the static site assets to be published.
10+
publish = "dist"
11+
12+
# Single Page Application (SPA) redirect rule
13+
# Redirects all requests to index.html for client-side routing
14+
[[redirects]]
15+
from = "/*"
16+
to = "/index.html"
17+
status = 200

apps/viewer/vercel.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://openapi.vercel.sh/vercel.json",
3+
"buildCommand": "pnpm --filter hdmap-viewer build",
4+
"outputDirectory": "dist",
5+
"framework": "vite",
6+
"cleanUrls": true,
7+
"rewrites": [
8+
{
9+
"source": "/(.*)",
10+
"destination": "/index.html"
11+
}
12+
]
13+
}

netlify.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Netlify configuration file at the monorepo root
2+
# Reference: https://docs.netlify.com/configure-builds/file-based-configuration/
3+
4+
[build]
5+
# Command to run from the root of the workspace.
6+
# This uses Turborepo to build dependencies (opendrive-parser) and then the viewer.
7+
command = "pnpm build"
8+
9+
# Directory containing the static site assets to be published.
10+
publish = "apps/viewer/dist"
11+
12+
# Single Page Application (SPA) redirect rule
13+
# Redirects all requests to index.html for client-side routing
14+
[[redirects]]
15+
from = "/*"
16+
to = "/index.html"
17+
status = 200

vercel.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://openapi.vercel.sh/vercel.json",
3+
"buildCommand": "pnpm build",
4+
"outputDirectory": "apps/viewer/dist",
5+
"framework": "vite",
6+
"cleanUrls": true,
7+
"rewrites": [
8+
{
9+
"source": "/(.*)",
10+
"destination": "/index.html"
11+
}
12+
]
13+
}

0 commit comments

Comments
 (0)