diff --git a/cli/tauri.js/src/helpers/tauri-config.ts b/cli/tauri.js/src/helpers/tauri-config.ts index b2d038fcd..8931d4258 100644 --- a/cli/tauri.js/src/helpers/tauri-config.ts +++ b/cli/tauri.js/src/helpers/tauri-config.ts @@ -31,7 +31,8 @@ const getTauriConfig = (cfg: Partial): TauriConfig => { ctx: {}, tauri: { embeddedServer: { - active: true + active: true, + port: "3000" }, bundle: { active: true, diff --git a/cli/tauri.js/src/types/config.schema.json b/cli/tauri.js/src/types/config.schema.json index 7791c4485..78493e630 100644 --- a/cli/tauri.js/src/types/config.schema.json +++ b/cli/tauri.js/src/types/config.schema.json @@ -399,6 +399,10 @@ "active": { "description": "whether we should use the embedded-server or the no-server mode", "type": "boolean" + }, + "port": { + "description": "enable custom port, instead of using random port", + "type": "string" } }, "type": "object" @@ -486,4 +490,4 @@ "tauri" ], "type": "object" -} \ No newline at end of file +} diff --git a/cli/tauri.js/src/types/config.ts b/cli/tauri.js/src/types/config.ts index d38a53703..2369bc28a 100644 --- a/cli/tauri.js/src/types/config.ts +++ b/cli/tauri.js/src/types/config.ts @@ -223,6 +223,7 @@ export interface TauriConfig { * whether we should use the embedded-server or the no-server mode */ active?: boolean + port?: string } /** * tauri bundler configuration diff --git a/cli/tauri.js/src/types/config.validator.ts b/cli/tauri.js/src/types/config.validator.ts index 5fb6d5534..005c70a92 100644 --- a/cli/tauri.js/src/types/config.validator.ts +++ b/cli/tauri.js/src/types/config.validator.ts @@ -409,6 +409,10 @@ export const TauriConfigSchema = { "active": { "description": "whether we should use the embedded-server or the no-server mode", "type": "boolean" + }, + "port": { + "description": "enable custom port, instead of using random port", + "type": "string" } }, "type": "object"