diff --git a/ts/deck-options/BUILD.bazel b/ts/deck-options/BUILD.bazel index d2c589472..d1f7bc0f1 100644 --- a/ts/deck-options/BUILD.bazel +++ b/ts/deck-options/BUILD.bazel @@ -50,6 +50,7 @@ ts_library( "lib", "//ts/components", "//ts/lib", + "//ts/sveltelib", "@npm//@popperjs", "@npm//svelte2tsx", ], diff --git a/ts/deck-options/index.ts b/ts/deck-options/index.ts index 3d6794f89..27b5a2b47 100644 --- a/ts/deck-options/index.ts +++ b/ts/deck-options/index.ts @@ -5,6 +5,7 @@ @typescript-eslint/no-explicit-any: "off", */ +import "sveltelib/cross-unit"; import { getDeckOptionsInfo, DeckOptionsState } from "./lib"; import { setupI18n, ModuleName } from "lib/i18n"; import { checkNightMode } from "lib/nightmode"; diff --git a/ts/editor/index.ts b/ts/editor/index.ts index 57671daac..9daeb9a23 100644 --- a/ts/editor/index.ts +++ b/ts/editor/index.ts @@ -6,6 +6,8 @@ @typescript-eslint/no-explicit-any: "off", */ +import "sveltelib/cross-unit"; + import { filterHTML } from "html-filter"; import { updateActiveButtons } from "./toolbar"; import { setupI18n, ModuleName } from "lib/i18n"; diff --git a/ts/sveltelib/cross-unit.ts b/ts/sveltelib/cross-unit.ts new file mode 100644 index 000000000..c83b80520 --- /dev/null +++ b/ts/sveltelib/cross-unit.ts @@ -0,0 +1,6 @@ +// Copyright: Ankitects Pty Ltd and contributors +// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html + +// allow Svelte add-ons +import * as svelte_internal from "svelte/internal"; +window["svelte_internal"] = svelte_internal;