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
This commit is contained in:
1 parent
b9c8ecb274
commit
6e21b3ed1f
3 files changed
+56
No files matched your search
@@ -5,6 +5,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"dev:tauri": "./scripts/dev-with-env.sh",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
|
||||
Reference in new issue
Block a user