diff --git a/src/lib/olap-engine/index.ts b/src/lib/olap-engine/index.ts
index bb82359..5dfc6a6 100644
--- a/src/lib/olap-engine/index.ts
+++ b/src/lib/olap-engine/index.ts
@@ -23,4 +23,4 @@ export interface OLAPEngine {
getSchema(): Promise
;
}
-export const engine: OLAPEngine = FORCE_REMOTE_ENGINE ? new RemoteEngine() : new CHDBEngine();
+export const engine: OLAPEngine = PLATFORM === 'WEB' ? new RemoteEngine() : new CHDBEngine();
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 5cc35c9..b3b4152 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -116,7 +116,7 @@
set_app_context({ context_menu });
let screen_width = $state(0);
- let is_mobile = $derived(screen_width < 768 && WEB_APP);
+ let is_mobile = $derived(screen_width < 768 && PLATFORM === 'WEB');
let open_drawer = $state(false);
$effect(() => {
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts
index d0033a0..6bb176b 100644
--- a/src/vite-env.d.ts
+++ b/src/vite-env.d.ts
@@ -1,4 +1,3 @@
-declare const FORCE_REMOTE_ENGINE: boolean;
-declare const WEB_APP: boolean;
+declare const PLATFORM: 'NATIVE' | 'WEB';
type MaybePromise = T | Promise;
diff --git a/vite.config.js b/vite.config.js
index c64734d..d5c63c5 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -22,7 +22,6 @@ export default defineConfig(async () => ({
exclude: ['@sqlite.org/sqlite-wasm']
},
define: {
- FORCE_REMOTE_ENGINE: process.env.FORCE_REMOTE_ENGINE === 'true',
- WEB_APP: process.env.WEB_APP === 'true'
+ PLATFORM: JSON.stringify(process.env.PLATFORM || 'NATIVE')
}
}));