vite-plugin-tauri-plus
v1.0.2
Published
Integrate Vite and Tauri
Downloads
19
Maintainers
Readme
vite-plugin-tauri-plus
Integrate Vite and Tauri
English | 简体中文
Install
$ npm install vite-plugin-tauri-plus -D
Usage
after init src-tauri
, add vite-plugin-tauri-plus
into vite.config.ts
.
import { defineConfig } from 'vite'
import tauri from 'vite-plugin-tauri-plus'
export default defineConfig({
plugins: [tauri()],
})
Options
Inject options into tauri cli
example
import { defineConfig } from 'vite'
import tauri from 'vite-plugin-tauri-plus'
export default defineConfig({
plugins: [
tauri({
bundles: ['deb', 'app', 'dmg'],
debug: true,
exitOnPanic: true,
release: true,
runner: 'cargo',
})
],
})
bundles
type: string[]
options: 'deb' | 'appimage' | 'msi' | 'app' | 'dmg' | 'updater'
description:
list of bundles to package. Each bundle must be one of
deb
,appimage
,msi
,app
ordmg
on MacOS andupdater
on all platforms. Note that theupdater
bundle is not automatically added so you must specify it if the updater is enabled.
config
type: string
description:
JSON string or path to JSON file to merge with tauri.conf.json
debug
type: boolean
description:
Builds with the debug flag
exitOnPanic
type: boolean
description:
Exit on panic
release
type: boolean
description:
Run the code in release mode
verbose
type: boolean
description:
Enables verbose logging
features
type: string[]
description:
List of cargo features to activate
target
type: string
description:
Target triple to build against.It must be one of the values outputted by
$rustc --print target-list
oruniversal-apple-darwin
for an universal macOS application. Note that compiling an universal macOS application requires bothaarch64-apple-darwin
andx86_64-apple-darwin
targets to be installed.
runner
type: string
description:
Binary to use to build the application, defaults to
cargo