.claude/skills/tauri-2/tauri-core/tauri-core-config/SKILL.md
Use when editing tauri.conf.json, configuring build options, or setting up platform-specific bundle configuration. Prevents invalid configuration keys and v1 config patterns that silently fail in Tauri 2. Covers build settings, app settings, window configuration, bundle options, plugin configuration, and security settings. Keywords: tauri.conf.json, configuration, build settings, bundle options, window config, security settings.
npx skillsauth add OpenAEC-Foundation/OpenAEC-Workspace-Composer tauri-core-configInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The main configuration file lives at src-tauri/tauri.conf.json. Tauri auto-generates JSON schemas in src-tauri/gen/schemas/ for IDE autocompletion.
| Key | Type | Required | Description |
|-----|------|----------|-------------|
| $schema | string | No | Path to JSON schema for IDE validation |
| identifier | string | Yes | Reverse domain notation (e.g., com.example.myapp) |
| productName | string \| null | No | Display name of the application |
| version | string \| null | No | Semver version or path to package.json |
| mainBinaryName | string \| null | No | Override the compiled binary filename |
| build | object | No | Build configuration |
| app | object | No | Application runtime configuration |
| bundle | object | No | Bundling and distribution configuration |
| plugins | object | No | Per-plugin configuration (default: {}) |
ALWAYS include the $schema key for IDE autocompletion and validation:
{
"$schema": "./gen/schemas/desktop-schema.json"
}
Available schemas (auto-generated in src-tauri/gen/schemas/):
desktop-schema.json -- desktop platform configurationmobile-schema.json -- mobile platform configurationremote-schema.json -- remote URL capabilitiesNEVER omit the identifier field -- it is the ONLY required field. It MUST be unique reverse-domain notation (com.example.myapp). Using a non-unique identifier causes conflicts with other apps on the system.
NEVER use build.devUrl without build.beforeDevCommand -- the dev server will not start automatically, causing Tauri to connect to nothing.
NEVER omit build.beforeBuildCommand -- frontend assets will not be compiled before bundling, producing an app with missing or stale UI.
NEVER set app.security.csp to null in production -- this disables all Content Security Policy restrictions, leaving the app vulnerable to XSS attacks.
NEVER set app.security.dangerousDisableAssetCspModification to true unless you fully understand CSP nonce injection.
NEVER edit files in gen/schemas/ -- they are auto-generated and will be overwritten on the next build.
The build section controls how the frontend is compiled and served during development and production.
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| devUrl | string \| null | null | Dev server URL (e.g., http://localhost:5173) |
| frontendDist | string \| array | -- | Path to compiled frontend assets (e.g., ../dist) |
| beforeDevCommand | string \| object | -- | Shell command before tauri dev |
| beforeBuildCommand | string \| object | -- | Shell command before tauri build |
| beforeBundleCommand | string \| object | -- | Shell command before the bundling phase |
| features | string[] \| null | null | Cargo feature flags to enable |
| additionalWatchFolders | string[] | [] | Extra paths to watch during tauri dev |
| removeUnusedCommands | boolean | false | Remove unused commands during build based on ACL config |
beforeDevCommand, beforeBuildCommand, and beforeBundleCommand support an object form:
{
"beforeDevCommand": {
"script": "npm run dev",
"cwd": "../frontend",
"wait": false
}
}
| Property | Type | Description |
|----------|------|-------------|
| script | string | The shell command to run |
| cwd | string | Working directory (relative to project root) |
| wait | boolean | Wait for the command to finish before continuing |
devUrl with beforeDevCommand -- the dev server must be running before Tauri connectsfrontendDist to the output directory of your frontend build toolbeforeBuildCommand to compile frontend assets for productionfrontendDist is relative to src-tauri/, so ../dist points to project-root/distThe app section configures runtime behavior including windows, security, and platform-specific features.
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| windows | WindowConfig[] | [] | Windows created at startup |
| security | object | -- | Security settings |
| trayIcon | TrayIconConfig \| null | null | System tray icon configuration |
| withGlobalTauri | boolean | false | Inject Tauri API on window.__TAURI__ |
| enableGTKAppId | boolean | false | Set identifier as GTK app ID (Linux) |
| macOSPrivateApi | boolean | false | Enable transparent background + fullscreen (macOS) |
app.windows[])| Property | Type | Default | Description |
|----------|------|---------|-------------|
| label | string | "main" | Unique window identifier |
| title | string | -- | Window title bar text |
| url | string | "/" | URL or path to load |
| width | number | -- | Width in logical pixels |
| height | number | -- | Height in logical pixels |
| x / y | number | -- | Window position |
| minWidth / minHeight | number | -- | Minimum dimensions |
| maxWidth / maxHeight | number | -- | Maximum dimensions |
| resizable | boolean | true | Allow resizing |
| fullscreen | boolean | false | Start fullscreen |
| focus | boolean | true | Focus on creation |
| create | boolean | true | Create at startup |
| transparent | boolean | false | Enable window transparency |
| decorations | boolean | true | Show title bar / borders |
| alwaysOnTop | boolean | false | Stay above other windows |
label for each window -- labels are used for IPC targeting and window lookupcreate: false for windows you want to create programmatically from Rusturl property accepts relative paths (/settings.html) or custom protocol URLsminWidth/minHeight to prevent the window from being resized too smallapp.security)| Property | Type | Default | Description |
|----------|------|---------|-------------|
| csp | string \| object \| null | null | Content Security Policy |
| capabilities | string[] | [] | Explicit capability file paths (overrides auto-discovery) |
| freezePrototype | boolean | false | Freeze JavaScript Object.prototype |
| dangerousDisableAssetCspModification | boolean \| string[] | false | Disable automatic CSP nonce injection |
| assetProtocol.enable | boolean | false | Enable the asset:// protocol |
| assetProtocol.scope | string[] | [] | Allowed paths for asset:// |
| pattern.use | string | "brownfield" | Application pattern ("brownfield" or "isolation") |
freezePrototype in production -- it prevents prototype pollution attacksnullisolation pattern for maximum security (adds an isolation layer between frontend and IPC)capabilities explicitly, auto-discovery of src-tauri/capabilities/ is disabledThe bundle section controls application packaging and distribution.
| Property | Type | Default | Description |
|----------|------|---------|-------------|
| active | boolean | true | Enable/disable bundling |
| targets | string \| string[] | "all" | Target platforms/formats |
| icon | string[] | -- | Icon file paths (all required sizes) |
| resources | object | {} | Additional files/directories to bundle |
| externalBin | string[] | [] | External binaries to embed as sidecars |
| fileAssociations | array | [] | File type associations |
| category | string | -- | App category (e.g., "Utility") |
| copyright | string | -- | Copyright notice |
| publisher | string | -- | Publisher name |
| license | string | -- | SPDX license identifier |
| licenseFile | string | -- | Path to license file |
| createUpdaterArtifacts | boolean \| "v1Compatible" | false | Generate update signatures |
ALWAYS include all required icon formats:
{
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
]
}
Use tauri icon CLI command to generate all sizes from a single source image.
bundle.windows)| Property | Type | Description |
|----------|------|-------------|
| nsis | object | NSIS installer configuration |
| wix | object | WiX (MSI) configuration |
| webviewInstallMode | string | "downloadBootstrapper" or "offlineInstallerFromUrl" |
| signCommand | string | Custom signing command (%1 = file path) |
| certificateThumbprint | string \| null | Certificate thumbprint for Authenticode |
| digestAlgorithm | string | Hash algorithm (typically "sha256") |
| timestampUrl | string | Timestamp server URL |
| allowDowngrades | boolean | Permit version downgrades |
bundle.macOS)| Property | Type | Description |
|----------|------|-------------|
| dmg | object | DMG configuration (window size, positions) |
| hardenedRuntime | boolean | Enable hardened runtime (default: true) |
| minimumSystemVersion | string | Minimum macOS version (default: "10.13") |
| signingIdentity | string \| null | Code signing identity |
bundle.linux)| Property | Type | Description |
|----------|------|-------------|
| deb | object | Debian package config |
| rpm | object | RPM package config |
| appimage | object | AppImage config |
| appimage.bundleMediaFramework | boolean | Bundle media framework (default: false) |
bundle.iOS)| Property | Type | Description |
|----------|------|-------------|
| minimumSystemVersion | string | Default: "14.0" |
bundle.android)| Property | Type | Description |
|----------|------|-------------|
| minSdkVersion | number | Default: 24 |
| versionCode | number | Auto-calculated from semver |
| autoIncrementVersionCode | boolean | Increment on each build |
TAURI_SIGNING_PRIVATE_KEY environment variable before enabling createUpdaterArtifactstrue for new projects, "v1Compatible" ONLY when migrating from Tauri v1 updaterThe plugins section provides per-plugin configuration as key-value pairs:
{
"plugins": {
"fs": {
"scope": {
"allow": ["$APPDATA/**", "$HOME/Documents/**"],
"deny": ["$HOME/.ssh/**"]
}
},
"http": {
"scope": {
"allow": ["https://api.example.com/*"]
}
}
}
}
Plugin configuration keys match the plugin name without the tauri-plugin- prefix.
The absolute minimum tauri.conf.json that works:
{
"identifier": "com.example.myapp",
"build": {
"devUrl": "http://localhost:5173",
"frontendDist": "../dist",
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build"
},
"app": {
"windows": [
{
"title": "My App",
"width": 800,
"height": 600
}
]
},
"bundle": {
"active": true,
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
]
}
}
development
Use when integrating Vite with a backend framework, rendering Vite assets from server-side templates, or setting up dev/production HTML serving. Prevents incorrect manifest.json traversal and missing CSS chunk resolution in production. Covers build.manifest configuration, .vite/manifest.json structure, ManifestChunk properties, dev mode HTML setup, production rendering, CSS/JS chunk resolution, and modulepreload polyfill. Keywords: backend integration, manifest.json, ManifestChunk, Django, Laravel, Rails, modulepreload.
development
Use when encountering dev server startup failures, HMR issues, proxy errors, CORS blocks, or module not found errors during development. Prevents misconfiguring server.hmr behind reverse proxies and forgetting appType: 'custom' in middleware mode. Covers HMR full-reload debugging, proxy configuration, CORS setup, HTTPS certificates, server.fs.strict violations, port conflicts, WebSocket failures, file watcher issues, and middleware mode. Keywords: dev server, HMR, proxy, CORS, HTTPS, WebSocket, port conflict, server.fs.strict, middleware mode, file watcher.
development
Use when encountering pre-bundling errors, dependency resolution failures, stale cache issues, or slow development server startup. Prevents excluding CJS dependencies from pre-bundling (which breaks runtime module resolution) and misconfiguring optimizeDeps. Covers CJS/ESM conversion failures, missing dependency auto-discovery, optimizeDeps configuration, monorepo linked dependencies, cache invalidation, browser cache staleness, and large dependency tree performance. Keywords: pre-bundling, optimizeDeps, CJS, ESM, cache, dependency resolution, monorepo, node_modules/.vite.
development
Use when encountering Vite build failures, chunk size warnings, or version-specific build errors. Prevents the common mistake of using deprecated rollupOptions in v8 or misconfiguring build targets and minifiers. Covers Rolldown/Rollup bundling failures, CSS minification errors, sourcemap problems, library mode build failures, BundleError handling, and asset processing errors. Keywords: build error, Rolldown, chunk size, sourcemap, library mode, minify, BundleError, rollupOptions, build.target.