From: Chris Duncan Date: Sat, 2 Aug 2025 18:59:12 +0000 (-0700) Subject: Enable indexeddb in node builds. X-Git-Tag: v0.10.5~47^2~11 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=3bb04a7ddc5f1b67d64369efa21b349289dea01a;p=libnemo.git Enable indexeddb in node builds. --- diff --git a/esbuild.mjs b/esbuild.mjs index 42c4a76..2f337af 100644 --- a/esbuild.mjs +++ b/esbuild.mjs @@ -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 index 0000000..3bfa68b --- /dev/null +++ b/fake-indexeddb.mjs @@ -0,0 +1,4 @@ +//! SPDX-FileCopyrightText: 2025 Chris Duncan +//! SPDX-License-Identifier: GPL-3.0-or-later + +import 'fake-indexeddb/auto'