fix: add conditional compilation for localhost URL in dev mode

This commit is contained in:
Tunglies
2025-06-13 03:11:35 +08:00
Unverified
parent e78a02d0ba
commit eef348b8dc
2 changed files with 4 additions and 1 deletions

View File

@@ -25,7 +25,6 @@
* Errors are logged and the process exits with code 1 on failure.
*/
import fs from "fs/promises";
import path from "path";
import { program } from "commander";

View File

@@ -63,6 +63,8 @@ impl IClashTemp {
vec![
"tauri://localhost",
"http://tauri.localhost",
// Only enable this in dev mode
#[cfg(feature = "verge-dev")]
"http://localhost:3000",
"https://yacd.metacubex.one",
"https://metacubex.github.io",
@@ -103,6 +105,8 @@ impl IClashTemp {
vec![
"tauri://localhost",
"http://tauri.localhost",
// Only enable this in dev mode
#[cfg(feature = "verge-dev")]
"http://localhost:3000",
"https://yacd.metacubex.one",
"https://metacubex.github.io",