refactor(branding): drop VITE_APP_NAME compat shim
Per the pre-public-launch policy in CLAUDE.md, strict-from-the-start. brand.json is the sole source for app naming; VITE_APP_NAME no longer overrides. Migration responsibility moves to aiolabs/server-deploy#8 (Phase 2): hosts that currently set VITE_APP_NAME (cfaun → "Bouge") must instead declare BRAND_DIR pointing at a per-host branding/ directory before their next webapp flake input bump. process.env.VITE_APP_NAME is still set internally (from brand.name) to keep Vite's HTML %VITE_APP_NAME% substitution working — but it's internal wiring now, not a user-facing knob. Part of aiolabs/webapp#95. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ce5a1a6a56
commit
4e7502b30c
2 changed files with 7 additions and 13 deletions
|
|
@ -43,13 +43,10 @@ function eventsHtmlPlugin(): Plugin {
|
|||
* (default: /) → bouge.ariege.io (standalone subdomain)
|
||||
*
|
||||
* Brand name resolves from brand.json under $BRAND_DIR (see
|
||||
* vite-branding.ts and aiolabs/webapp#95). VITE_APP_NAME remains an
|
||||
* env override during the Phase 2 server-deploy migration; drop the
|
||||
* env path once all hosts have moved to BRAND_DIR.
|
||||
* vite-branding.ts and aiolabs/webapp#95). Surfaced into Vite's HTML
|
||||
* env-var substitution as VITE_APP_NAME for templated titles.
|
||||
*/
|
||||
const APP_NAME = process.env.VITE_APP_NAME ?? brandManifestName()
|
||||
// Surface the resolved value back into env so Vite's HTML %VITE_APP_NAME%
|
||||
// substitution picks up the fallback when nothing was explicitly set.
|
||||
const APP_NAME = brandManifestName()
|
||||
process.env.VITE_APP_NAME = APP_NAME
|
||||
|
||||
export default defineConfig(({ mode }) => ({
|
||||
|
|
@ -88,9 +85,7 @@ export default defineConfig(({ mode }) => ({
|
|||
],
|
||||
manifest: {
|
||||
name: APP_NAME,
|
||||
// VITE_APP_NAME, when set, overrides both name and short_name to
|
||||
// preserve the pre-#95 behavior. Otherwise brand.shortName drives.
|
||||
short_name: process.env.VITE_APP_NAME ?? brand.shortName ?? APP_NAME,
|
||||
short_name: brand.shortName ?? APP_NAME,
|
||||
description: 'Discover events near you',
|
||||
theme_color: brand.themeColor ?? '#1f2937',
|
||||
background_color: brand.backgroundColor ?? '#ffffff',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue