-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-web.ps1
More file actions
24 lines (18 loc) · 959 Bytes
/
build-web.ps1
File metadata and controls
24 lines (18 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# build-web.ps1
# Loads .env, builds Expo web app for Firebase Hosting deployment.
# EXPO_PUBLIC_ vars must be present during export to be baked into the bundle.
# Output goes to the /dist folder.
$ErrorActionPreference = "Stop"
$ProjectDir = $PSScriptRoot
Write-Host "--- Sentient UI: Build Web ---" -ForegroundColor Cyan
Set-Location $ProjectDir
# Load .env so EXPO_PUBLIC_ vars are baked into the production bundle
. "$ProjectDir\load-env.ps1"
Write-Host "Clearing previous build..." -ForegroundColor Yellow
if (Test-Path "$ProjectDir\dist") { Remove-Item -Recurse -Force "$ProjectDir\dist" }
Write-Host "Building for web (Expo export -> dist)..." -ForegroundColor Green
# Ensure expo exports to the expected `dist` folder used by Firebase hosting
npx expo export --platform web --output-dir dist
Write-Host ""
Write-Host "Build complete -> dist/" -ForegroundColor Green
Write-Host "Deploy with: firebase deploy --only hosting" -ForegroundColor Cyan