Struct tauri_utils::config::BuildConfig
source · pub struct BuildConfig {
pub runner: Option<String>,
pub dev_path: AppUrl,
pub dist_dir: AppUrl,
pub before_dev_command: Option<BeforeDevCommand>,
pub before_build_command: Option<HookCommand>,
pub before_bundle_command: Option<HookCommand>,
pub features: Option<Vec<String>>,
pub with_global_tauri: bool,
}
Expand description
The Build configuration object.
Fields
runner: Option<String>
The binary used to build and run the application.
dev_path: AppUrl
The path to the application assets or URL to load in development.
This is usually an URL to a dev server, which serves your application assets with live reloading. Most modern JavaScript bundlers provides a way to start a dev server by default.
See vite, Webpack DevServer and sirv for examples on how to set up a dev server.
dist_dir: AppUrl
The path to the application assets or URL to load in production.
When a path relative to the configuration file is provided,
it is read recursively and all files are embedded in the application binary.
Tauri then looks for an index.html
file unless you provide a custom window URL.
You can also provide a list of paths to be embedded, which allows granular control over what files are added to the binary. In this case, all files are added to the root and you must reference it that way in your HTML files.
When an URL is provided, the application won’t have bundled assets and the application will load that URL by default.
before_dev_command: Option<BeforeDevCommand>
A shell command to run before tauri dev
kicks in.
The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
before_build_command: Option<HookCommand>
A shell command to run before tauri build
kicks in.
The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
before_bundle_command: Option<HookCommand>
A shell command to run before the bundling phase in tauri build
kicks in.
The TAURI_PLATFORM, TAURI_ARCH, TAURI_FAMILY, TAURI_PLATFORM_VERSION, TAURI_PLATFORM_TYPE and TAURI_DEBUG environment variables are set if you perform conditional compilation.
features: Option<Vec<String>>
Features passed to cargo
commands.
with_global_tauri: bool
Whether we should inject the Tauri API on window.__TAURI__
or not.
Trait Implementations
sourceimpl Clone for BuildConfig
impl Clone for BuildConfig
sourcefn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more