mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 12:47:10 +02:00
chore(server/esbuild): switch to cjs to embed deps
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { assetUrlFragment } from "../services/asset_path.js";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import express from "express";
|
||||
import { getResourceDir, isDev } from "../services/utils.js";
|
||||
import type serveStatic from "serve-static";
|
||||
@@ -18,7 +17,7 @@ const persistentCacheStatic = (root: string, options?: serveStatic.ServeStaticOp
|
||||
};
|
||||
|
||||
async function register(app: express.Application) {
|
||||
const srcRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
const srcRoot = path.join(__dirname, "..");
|
||||
const resourceDir = getResourceDir();
|
||||
|
||||
if (isDev) {
|
||||
|
||||
@@ -16,7 +16,7 @@ let dayjsLocale: string;
|
||||
|
||||
export async function initializeTranslations() {
|
||||
const resourceDir = getResourceDir();
|
||||
const Backend = (await import("i18next-fs-backend")).default;
|
||||
const Backend = (await import("i18next-fs-backend/cjs")).default;
|
||||
const locale = getCurrentLanguage();
|
||||
|
||||
// Initialize translations
|
||||
|
||||
Reference in New Issue
Block a user