Skip to content

Commit

Permalink
fix vite define ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
sehnryr committed Dec 14, 2024
1 parent 5e03d38 commit d46bb8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/Browse/ExtensionBrowse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const MangaItem = (
) => {
const [loading, setLoading] = useState<boolean>(true);

const platform = import.meta.env.TAURI_ENV_PLATFORM;
const platform = (globalThis as Record<string, unknown>).TAURI_ENV_PLATFORM;
let uri: string;

if (platform === "windows" || platform === "android") {
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export default defineConfig({
sourcemap: !!TAURI_ENV_DEBUG,
},
define: {
"import.meta.env.TAURI_ENV_PLATFORM": JSON.stringify(TAURI_ENV_PLATFORM),
TAURI_ENV_PLATFORM: JSON.stringify(TAURI_ENV_PLATFORM),
},
});

0 comments on commit d46bb8e

Please sign in to comment.