Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: preload script in tauri should not have `export`

linonetwo5176d57d28ff
diff --git a/client-app/src-tauri/tauri.conf.json b/client-app/src-tauri/tauri.conf.json
index 677d79f0ab..28267da132 100644
--- a/client-app/src-tauri/tauri.conf.json
+++ b/client-app/src-tauri/tauri.conf.json
@@ -1,7 +1,7 @@
{
"build": {
"beforeDevCommand": "pnpm dev:prerequisite",
- "beforeBuildCommand": "pnpm build:web && pnpm build:affine && pnpm build:preload",
+ "beforeBuildCommand": "pnpm build:web && pnpm build:preload && pnpm build:affine && pnpm build:preload",
"devPath": "http://localhost:8080",
"distDir": "../dist",
"withGlobalTauri": false
diff --git a/client-app/src/preload/index.ts b/client-app/src/preload/index.ts
index 8c0adf5c5c..31202e1006 100644
--- a/client-app/src/preload/index.ts
+++ b/client-app/src/preload/index.ts
@@ -16,12 +16,3 @@ function setEnvironmentVariables() {
}
setEnvironmentVariables();
-
-declare global {
- interface Window {
- CLIENT_APP?: boolean;
- __editoVersion?: string;
- }
-}
-
-export {};
diff --git a/client-app/src/preload/type.ts b/client-app/src/preload/type.ts
new file mode 100644
index 0000000000..9e71ac5b62
--- /dev/null
+++ b/client-app/src/preload/type.ts
@@ -0,0 +1,8 @@
+declare global {
+ interface Window {
+ CLIENT_APP?: boolean;
+ __editoVersion?: string;
+ }
+}
+
+export {};