Export svelte_internal as library on window object

Closes https://github.com/ankitects/anki/issues/1328.
This commit is contained in:
Henrik Giesel 2021-08-23 21:16:15 +02:00
parent 53fe7e574e
commit 1495fdf311
4 changed files with 10 additions and 0 deletions

View File

@ -50,6 +50,7 @@ ts_library(
"lib", "lib",
"//ts/components", "//ts/components",
"//ts/lib", "//ts/lib",
"//ts/sveltelib",
"@npm//@popperjs", "@npm//@popperjs",
"@npm//svelte2tsx", "@npm//svelte2tsx",
], ],

View File

@ -5,6 +5,7 @@
@typescript-eslint/no-explicit-any: "off", @typescript-eslint/no-explicit-any: "off",
*/ */
import "sveltelib/cross-unit";
import { getDeckOptionsInfo, DeckOptionsState } from "./lib"; import { getDeckOptionsInfo, DeckOptionsState } from "./lib";
import { setupI18n, ModuleName } from "lib/i18n"; import { setupI18n, ModuleName } from "lib/i18n";
import { checkNightMode } from "lib/nightmode"; import { checkNightMode } from "lib/nightmode";

View File

@ -6,6 +6,8 @@
@typescript-eslint/no-explicit-any: "off", @typescript-eslint/no-explicit-any: "off",
*/ */
import "sveltelib/cross-unit";
import { filterHTML } from "html-filter"; import { filterHTML } from "html-filter";
import { updateActiveButtons } from "./toolbar"; import { updateActiveButtons } from "./toolbar";
import { setupI18n, ModuleName } from "lib/i18n"; import { setupI18n, ModuleName } from "lib/i18n";

View File

@ -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;