mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 00:35:38 +08:00
fix: add conditional compilation for localhost URL in dev mode
This commit is contained in:
@@ -25,7 +25,6 @@
|
|||||||
* Errors are logged and the process exits with code 1 on failure.
|
* Errors are logged and the process exits with code 1 on failure.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import fs from "fs/promises";
|
import fs from "fs/promises";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { program } from "commander";
|
import { program } from "commander";
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ impl IClashTemp {
|
|||||||
vec![
|
vec![
|
||||||
"tauri://localhost",
|
"tauri://localhost",
|
||||||
"http://tauri.localhost",
|
"http://tauri.localhost",
|
||||||
|
// Only enable this in dev mode
|
||||||
|
#[cfg(feature = "verge-dev")]
|
||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
"https://yacd.metacubex.one",
|
"https://yacd.metacubex.one",
|
||||||
"https://metacubex.github.io",
|
"https://metacubex.github.io",
|
||||||
@@ -103,6 +105,8 @@ impl IClashTemp {
|
|||||||
vec![
|
vec![
|
||||||
"tauri://localhost",
|
"tauri://localhost",
|
||||||
"http://tauri.localhost",
|
"http://tauri.localhost",
|
||||||
|
// Only enable this in dev mode
|
||||||
|
#[cfg(feature = "verge-dev")]
|
||||||
"http://localhost:3000",
|
"http://localhost:3000",
|
||||||
"https://yacd.metacubex.one",
|
"https://yacd.metacubex.one",
|
||||||
"https://metacubex.github.io",
|
"https://metacubex.github.io",
|
||||||
|
|||||||
Reference in New Issue
Block a user