When to use this skill
ALWAYS use this skill when the user mentions:
- Configuring tauri.conf.json / 配置 tauri.conf.json
- Config changes from Tauri v1 to v2 / v1 到 v2 的配置变更
- CSP or platform-specific config sections / CSP 或平台配置段
Trigger phrases include:
- "tauri.conf.json", "config", "CSP", "android", "ios"
- "配置", "CSP", "Android", "iOS"
How to use this skill
- Identify app requirements and platform targets
- Map requirements to tauri.conf.json sections
- Apply v2 config layout and plugin locations
- Validate CSP and platform config for desktop and mobile
Outputs
- Config structure mapping / 配置结构映射
- CSP and platform config checklist / CSP 与平台配置清单
Scope
- Boundary: tauri.conf.json lifecycle management
- v2 focus: Config structure changes and platform sections
References
- https://v2.tauri.app/llms.txt
- https://v2.tauri.app/reference/config/
- https://v2.tauri.app/security/csp/
Keywords
tauri v2, tauri.conf.json, config, csp, plugins, android, ios
Common Gotchas (Gotchas)
- Version compatibility: Pay attention to the compatibility between framework versions and dependency libraries; APIs may differ across versions
- Config file format: Config file format errors are the most common problem; it is recommended to use your editor's syntax checking
- Environment variables: Ensure all necessary environment variables are set correctly, and do not hardcode sensitive information
- Dependency conflicts: When multiple versions coexist, watch out for dependency conflicts and use a lock file to pin versions
- Performance pitfalls: In large-data scenarios, pay attention to performance optimization and avoid common issues such as N+1 queries
Usage flow
Step 1: Environment preparation
Ensure the development environment has the necessary dependencies and tools installed.
Step 2: Configuration initialization
Perform basic configuration according to project requirements.
Step 3: Using core features
Implement core functionality according to the example code.
Step 4: Test verification
Run tests to ensure functionality works properly.
Step 5: Deployment and release
After development is complete, proceed with deployment and monitoring.