Skip to content

Commit bbecfda

Browse files
committed
Hack to get smol-toml import working
1 parent cca89dc commit bbecfda

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

backend/src/bot/plugin/core/config_sync.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import AsyncLock from "async-lock";
2-
import { parse as parseToml, TomlError } from "smol-toml";
32
import { safeParse } from "valibot";
43
import { bot } from "../..";
54
import { get_guild_config, insert_guild_config } from "../../../db/core/configs";
@@ -54,6 +53,8 @@ export async function install_config_change_listener(): Promise<void> {
5453
}
5554

5655
async function load_config(guild_id: string, plugin: Plugin): Promise<void> {
56+
const { parse: parseToml, TomlError } = await import("smol-toml");
57+
5758
if (plugin.config === undefined)
5859
return;
5960

backend/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"compilerOptions": {
33
"target": "ESNext",
4-
"module": "NodeNext",
4+
"module": "Node16",
55
"strict": true,
66
"noImplicitAny": false,
77
"noUncheckedIndexedAccess": true,
8-
"skipLibCheck": true
8+
"skipLibCheck": true,
99
}
1010
}

0 commit comments

Comments
 (0)