|
| 1 | +--- |
| 2 | +id: config |
| 3 | +title: "Configuration" |
| 4 | +sidebar_label: Configuration |
| 5 | +--- |
| 6 | + |
| 7 | +The `tauri.conf.json` is a generated file living in your Tauri application source directory (src-tauri). |
| 8 | + |
| 9 | +It's composed of the following properties: |
| 10 | + |
| 11 | +## build |
| 12 | + |
| 13 | +### `distDir` |
| 14 | + |
| 15 | +Type: string |
| 16 | + |
| 17 | +The path - either absolute or relative - to the production-ready webpage/webapp directory that will be bundled by Tauri. |
| 18 | + |
| 19 | +> The target directory _must_ contain an index.html file. |
| 20 | +
|
| 21 | +### `devPath` |
| 22 | + |
| 23 | +Type: string |
| 24 | + |
| 25 | +Can be a path - either absolute or relative - to a folder or a URL (like a live reload server). |
| 26 | + |
| 27 | +### `beforeDevCommand` |
| 28 | + |
| 29 | +Type: string<br> Default: `""` |
| 30 | + |
| 31 | +A command to run before starting Tauri in dev mode. |
| 32 | + |
| 33 | +### `beforeBuildCommand` |
| 34 | + |
| 35 | +Type: string<br> Default: `""` |
| 36 | + |
| 37 | +A command to run before starting Tauri in build mode. |
| 38 | + |
| 39 | +## ctx |
| 40 | + |
| 41 | +### `prod` |
| 42 | + |
| 43 | +Type: boolean<br> Default: |
| 44 | + |
| 45 | + |
| 46 | +### `dev` |
| 47 | + |
| 48 | +Type: boolean<br> Default: |
| 49 | + |
| 50 | +### `target` |
| 51 | + |
| 52 | +Type: string<br> Default: |
| 53 | + |
| 54 | +### `debug` |
| 55 | + |
| 56 | +Type: boolean<br> Default: |
| 57 | + |
| 58 | +### `targetName` |
| 59 | + |
| 60 | +Type: string<br> Default: |
| 61 | + |
| 62 | +### `exitOnPanic` |
| 63 | + |
| 64 | +Type: boolean<br> Default: |
| 65 | + |
| 66 | +## tauri |
| 67 | + |
| 68 | +### `embeddedServer` |
| 69 | + |
| 70 | +Type: object<br> |
| 71 | + |
| 72 | +A property to determine if Tauri should embed a webserver to run your application. <br> Set it to `{ "active": false }` if you plan to serve your application statically. |
| 73 | + |
| 74 | +### `bundle` |
| 75 | + |
| 76 | +Type: object<br> |
| 77 | + |
| 78 | +```js |
| 79 | +{ |
| 80 | + tauri: { |
| 81 | + embeddedServer: { |
| 82 | + active: true |
| 83 | + }, |
| 84 | + bundle: { |
| 85 | + active: true, |
| 86 | + identifier: 'com.tauri.dev', |
| 87 | + icon : [ 'icons/32x32.png', 'icons/128x128.png', 'icons/[email protected]', 'icons/icon.icns', 'icons/icon.ico'], |
| 88 | + resources: [], |
| 89 | + externalBin: [], |
| 90 | + copyright: '', |
| 91 | + category: 'DeveloperTool', |
| 92 | + shortDescription: '', |
| 93 | + longDescription: '', |
| 94 | + deb: { |
| 95 | + depends: [] |
| 96 | + }, |
| 97 | + osx: { |
| 98 | + frameworks: [], |
| 99 | + minimumSystemVersion: '' |
| 100 | + }, |
| 101 | + exceptionDomain: '' |
| 102 | + }, |
| 103 | + whitelist: { |
| 104 | + all: true |
| 105 | + }, |
| 106 | + window: { |
| 107 | + title: 'Tauri App', |
| 108 | + width: 800, |
| 109 | + height: 600, |
| 110 | + resizable: true, |
| 111 | + fullscreen: false |
| 112 | + }, |
| 113 | + security: { |
| 114 | + csp: "default-src blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'" |
| 115 | + }, |
| 116 | + edge: { |
| 117 | + active: true |
| 118 | + }, |
| 119 | + inliner: { |
| 120 | + active: true |
| 121 | + } |
| 122 | + } |
| 123 | +} |
| 124 | +``` |
0 commit comments