Skip to content

Commit

Permalink
fix json imports
Browse files Browse the repository at this point in the history
  • Loading branch information
AshyBoxy committed Aug 28, 2024
1 parent 913b49e commit 3c90a80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Classes/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class BreadClient<Databases extends Record<string, IDatabase<any>> = Record<stri
];
for (const file of moduleFiles) this.modules.push({
path: path.dirname(file),
...(await import(file, file.endsWith(".json") ? { assert: { type: "json" } } : undefined)).default
...(await import(file, file.endsWith(".json") ? { with: { type: "json" } } : undefined)).default
});

for (let i = 0; i < this.modules.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/strings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const defaultStringsPath = "./english.json";
// const defaultStringsPath = "./french.json";
const defaultStrings: TranslationData = {
name: "breadfw_defaultstrings",
data: (await import(defaultStringsPath, { assert: { type: "json" } })).default
data: (await import(defaultStringsPath, { with: { type: "json" } })).default
};


Expand Down

0 comments on commit 3c90a80

Please sign in to comment.