From f503c4ca6ce034be42ba5a7819304e80e7cb2a72 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 10 Jan 2026 21:49:16 +0200 Subject: [PATCH] feat(ckeditor5-math): use dynamic import to reduce loading time --- packages/ckeditor5-math/src/index.ts | 5 +---- packages/ckeditor5-math/src/ui/mathinputview.ts | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/ckeditor5-math/src/index.ts b/packages/ckeditor5-math/src/index.ts index eac4d7b22..fca15d1b0 100644 --- a/packages/ckeditor5-math/src/index.ts +++ b/packages/ckeditor5-math/src/index.ts @@ -1,9 +1,6 @@ import ckeditor from './../theme/icons/math.svg?raw'; import './augmentation.js'; -import "../theme/mathform.css"; -import 'mathlive'; -import 'mathlive/fonts.css'; -import 'mathlive/static.css'; +import '../theme/mathform.css'; export { default as Math } from './math.js'; export { default as MathUI } from './mathui.js'; diff --git a/packages/ckeditor5-math/src/ui/mathinputview.ts b/packages/ckeditor5-math/src/ui/mathinputview.ts index 027b7aab9..2eb0347e5 100644 --- a/packages/ckeditor5-math/src/ui/mathinputview.ts +++ b/packages/ckeditor5-math/src/ui/mathinputview.ts @@ -2,6 +2,7 @@ // and keeps them in sync for the CKEditor 5 math dialog. import { View, type Locale, type FocusableView } from 'ckeditor5'; import 'mathlive/fonts.css'; // Auto-bundles offline fonts +import 'mathlive/static.css'; // Static styles for mathlive declare global { interface Window {