Files
qbz/scripts/dev-with-env.sh
T
vicrodh 6e21b3ed1f docs(dev): add script and docs for local API key loading
- Create dev-with-env.sh script to load .env before build
- Add npm run dev:tauri command that uses the script
- Document why .env must be loaded before compilation
- Explain compile-time vs runtime environment variables

The issue: option_env!() reads vars at compile time, but .env
loads at runtime. Solution: source .env before cargo build.

cp
2026-01-14 19:43:18 -06:00

11 lines
147 B
Bash
Executable File

#!/bin/bash
# Development script that loads .env variables before building
set -a
if [ -f .env ]; then
source .env
fi
set +a
npm run tauri dev