]> git.codecow.com Git - libnemo.git/commitdiff
Enable indexeddb in node builds.
authorChris Duncan <chris@zoso.dev>
Sat, 2 Aug 2025 18:59:12 +0000 (11:59 -0700)
committerChris Duncan <chris@zoso.dev>
Sat, 2 Aug 2025 18:59:12 +0000 (11:59 -0700)
esbuild.mjs
fake-indexeddb.mjs [new file with mode: 0644]

index 42c4a76a0dffbb20608b243d835eea68582495d0..2f337af5d46c9c74763911a30fd999c87209381e 100644 (file)
@@ -37,6 +37,7 @@ export const nodeOptions = {
                { in: './src/main.ts', out: 'nodejs.min' }
        ],
        dropLabels: ['BROWSER'],
-       external: ['node:worker_threads']
+       external: ['node:worker_threads'],
+       inject: ['./fake-indexeddb.mjs']
 }
 await build(nodeOptions)
diff --git a/fake-indexeddb.mjs b/fake-indexeddb.mjs
new file mode 100644 (file)
index 0000000..3bfa68b
--- /dev/null
@@ -0,0 +1,4 @@
+//! SPDX-FileCopyrightText: 2025 Chris Duncan <chris@zoso.dev>
+//! SPDX-License-Identifier: GPL-3.0-or-later
+
+import 'fake-indexeddb/auto'