perf: keep Markdown segmentation for single-line display math and ship KaTeX fonts as files

This commit is contained in:
mesalogo
2026-10-02 14:41:56 +08:00
parent 80579ee421
commit 3d4e9577b5
5 changed files with 139 additions and 21 deletions
+8
View File
@@ -2,11 +2,19 @@
import { describe, expect, it } from 'vitest'
import {
rendererAssetInlineLimit,
stableMainEntryFileName,
serializeDeepSeekHarnessBundleManifest
} from '../electron.vite.config'
describe('Electron Vite configuration', () => {
it('never inlines renderer fonts as data URLs blocked by the CSP', () => {
expect(rendererAssetInlineLimit('/n/katex/dist/fonts/KaTeX_Size4-Regular.woff2')).toBe(false)
expect(rendererAssetInlineLimit('/n/katex/dist/fonts/KaTeX_Size4-Regular.woff')).toBe(false)
expect(rendererAssetInlineLimit('/n/katex/dist/fonts/KaTeX_Size4-Regular.ttf')).toBe(false)
expect(rendererAssetInlineLimit('/n/inter.woff2?url')).toBe(false)
expect(rendererAssetInlineLimit('/src/renderer/src/assets/logo.png')).toBeUndefined()
})
it('keeps Utility Process bootstrap entry names stable', () => {
expect(
stableMainEntryFileName({