diff --git a/apps/client/vite.config.mts b/apps/client/vite.config.mts index 640313bff..72ef792ac 100644 --- a/apps/client/vite.config.mts +++ b/apps/client/vite.config.mts @@ -41,11 +41,6 @@ export default defineConfig(() => ({ ] as Plugin[], resolve: { alias: [ - // Force the use of dist in development mode because upstream ESM is broken (some hybrid between CJS and ESM, will be improved in upcoming versions). - { - find: "@triliumnext/highlightjs", - replacement: resolve(__dirname, "node_modules/@triliumnext/highlightjs/dist") - }, { find: "react", replacement: "preact/compat" diff --git a/packages/highlightjs/src/index.ts b/packages/highlightjs/src/index.ts index 29ffec2a7..355268179 100644 --- a/packages/highlightjs/src/index.ts +++ b/packages/highlightjs/src/index.ts @@ -1,4 +1,4 @@ -import hljs from "../node_modules/highlight.js/es/core.js"; +import hljs from "highlight.js"; import { normalizeMimeTypeForCKEditor, type MimeType } from "@triliumnext/commons"; import syntaxDefinitions from "./syntax_highlighting.js"; import { type Theme } from "./themes.js";