From a3ad4237feee8f461aa45f5cf3bc84641ba2cb5a Mon Sep 17 00:00:00 2001 From: Kotataro taniguchi <119092698+kotarotaniguchi0523@users.noreply.github.com> Date: Mon, 16 Nov 2026 13:20:19 +0000 Subject: [PATCH 1/4] perf(docs): highlight code with @pierre/highlights Highlight the code blocks of the docs with @pierre/highlights, the library that @void/md highlights with, through `markdown.highlight` of VitePress. Render the markup that VitePress renders with Shiki, so that the theme, the copy button and code groups do not change. Stop the build on a language that the highlighter does not have, because nothing else reports a block without colors. Take @pierre/highlights from the catalog in the docs and in @void/md, so that the two use one version. The docs build takes 9.7 s where it took 17.2 s. Co-Authored-By: Claude Fable 5.2 --- docs/.vitepress/config.ts | 2 + docs/.vitepress/highlight.ts | 253 +++++++++++++++++++++++++++++++++++ docs/package.json | 1 + packages/md/package.json | 2 +- pnpm-lock.yaml | 8 +- pnpm-workspace.yaml | 1 + 6 files changed, 265 insertions(+), 2 deletions(-) create mode 100644 docs/.vitepress/highlight.ts diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 3139a0f97..b142e819f 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -3,6 +3,7 @@ import { extendConfig } from '@voidzero-dev/vitepress-theme/config'; import { defineConfig, type DefaultTheme } from 'vitepress'; import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons'; import llmstxt from 'vitepress-plugin-llms'; +import { createCodeHighlighter } from './highlight.ts'; type SidebarItem = DefaultTheme.SidebarItem; @@ -239,6 +240,7 @@ export default extendConfig( ignoreDeadLinks: [/\/index$/], markdown: { + highlight: createCodeHighlighter(), config(md) { md.use(groupIconMdPlugin); }, diff --git a/docs/.vitepress/highlight.ts b/docs/.vitepress/highlight.ts new file mode 100644 index 000000000..4c7850b15 --- /dev/null +++ b/docs/.vitepress/highlight.ts @@ -0,0 +1,253 @@ +// Code highlighting for the docs with @pierre/highlights, in place of the +// Shiki highlighter of VitePress. It renders the markup that the theme CSS and +// the copy button select on. +// +// This is a fork of `packages/md/src/highlight.ts` with the class names of +// VitePress. Mirror fixes to the notation handling there. + +import { codeToTokens, isSupportedLanguage } from '@pierre/highlights'; +import type { Lang, ThemedToken } from '@pierre/highlights'; +import dark from '@pierre/highlights/themes/github-dark'; +import light from '@pierre/highlights/themes/github-light'; + +/** The `markdown.highlight` option of VitePress. */ +export type CodeHighlighter = (code: string, lang: string, attrs: string) => string; + +const OPTIONS = { + themes: { light, dark }, + defaultColor: false, + // The theme CSS reads the colors from these variables. + cssVariablePrefix: '--shiki-', +} as const; + +// The contrast fixes that VitePress applies to these two themes, by the CSS +// variable of the theme. +const COLOR_REPLACEMENTS: Record> = { + '--shiki-light': { + '#959da5': '#6c676f', + '#28a745': '#0e790b', + '#b08800': '#846312', + '#e36209': '#c13617', + '#3192aa': '#05728b', + '#d73a49': '#c62739', + '#22863a': '#11782a', + '#6a737d': '#62687b', + '#1b7c83': '#06747a', + '#0366d6': '#0663d0', + '#cb2431': '#c82430', + }, + '--shiki-dark': { + '#586069': '#5b93a3', + '#6a737d': '#818e99', + '#ea4a5a': '#ef5564', + '#2188ff': '#268bf9', + }, +}; + +const TOKEN_COMMENT = 1; + +// The classes a notation gives its line. The block gets the class in `pre`. +const NOTATIONS: Record; pre: string }>> = { + '++': { line: ['diff', 'add'], pre: 'has-diff' }, + '--': { line: ['diff', 'remove'], pre: 'has-diff' }, + highlight: { line: ['highlighted'], pre: 'has-highlighted' }, + hl: { line: ['highlighted'], pre: 'has-highlighted' }, + focus: { line: ['has-focus'], pre: 'has-focused-lines' }, + error: { line: ['highlighted', 'error'], pre: 'has-highlighted' }, + warning: { line: ['highlighted', 'warning'], pre: 'has-highlighted' }, +}; + +const NOTATION_RE = new RegExp( + `\\s*\\[!code (${Object.keys(NOTATIONS) + .map((name) => name.replace(/\+/g, '\\+')) + .join('|')})(?::(\\d+))?\\]`, + 'g', +); +// What is left of a comment once its notations are removed: only delimiters. +const EMPTY_COMMENT_RE = /^\s*(?:\/\/|\/\*|\*\/||--|[#;%"'*]|\s)*\s*$/; + +function escapeHtml(text: string): string { + return /[&<]/.test(text) ? text.replace(/&/g, '&').replace(/; + +/** The 1-based line ranges of a `{1,3-5}` list in the fence info, if it has one. */ +function metaHighlightedRanges(meta: string): ReadonlyArray | null { + const match = /\{([\d,-]+)\}/.exec(meta); + if (!match) { + return null; + } + const ranges: Array = []; + for (const part of match[1].split(',')) { + const [from, to] = part.split('-').map((value) => parseInt(value, 10)); + if (!Number.isNaN(from)) { + ranges.push({ from, to: to === undefined || Number.isNaN(to) ? from : to }); + } + } + return ranges; +} + +type Notation = Readonly<{ line: ReadonlyArray; pre: string; count: number }>; + +/** + * Splits the `[!code ...]` notations from the comments of a line. + * A comment that held nothing else is removed with them. + */ +function takeNotations( + tokens: ReadonlyArray, +): Readonly<{ tokens: Array; notations: ReadonlyArray }> { + const notations: Array = []; + const kept: Array = []; + for (const token of tokens) { + if (token.type !== TOKEN_COMMENT || !token.content.includes('[!code ')) { + kept.push(token); + continue; + } + const content = token.content.replace( + NOTATION_RE, + (_match, name: string, count: string | undefined) => { + notations.push({ ...NOTATIONS[name], count: count ? Math.max(1, parseInt(count, 10)) : 1 }); + return ''; + }, + ); + if (!EMPTY_COMMENT_RE.test(content)) { + kept.push(content === token.content ? token : { ...token, content }); + } + } + // The space that separated the code from a removed comment goes with it. + const last = kept.at(-1); + if (notations.length > 0 && last) { + const content = last.content.trimEnd(); + if (!content) { + kept.pop(); + } else if (content !== last.content) { + kept[kept.length - 1] = { ...last, content }; + } + } + return { tokens: kept, notations }; +} + +// The highlighter gives every token of one kind the same style object. +const spanOpeners = new WeakMap(); + +function spanOpener(token: ThemedToken): string { + const style = token.htmlStyle; + if (!style) { + return ''; + } + let opener = spanOpeners.get(style); + if (opener === undefined) { + const css = Object.entries(style) + .map( + ([property, value]) => + `${property}:${COLOR_REPLACEMENTS[property]?.[value.toLowerCase()] ?? value}`, + ) + .join(';'); + opener = ``; + spanOpeners.set(style, opener); + } + return opener; +} + +function renderLine(tokens: ReadonlyArray, classes: string): string { + let html = ``; + // The theme collapses a line that has no element in it. + if (tokens.length === 0) { + return `${html}`; + } + // Tokens that look the same share one span, and whitespace joins the token + // after it. Fewer elements make the page smaller and faster to build. + let open = ''; + let space = ''; + for (const token of tokens) { + if (!/\S/.test(token.content)) { + space += token.content; + continue; + } + const opener = spanOpener(token); + if (opener !== open) { + html += `${open ? '' : ''}${opener}`; + open = opener; + } + html += space + escapeHtml(token.content); + space = ''; + } + if (space) { + html += open ? space : `${space}`; + } + return `${html}`; +} + +/** + * Creates the highlighter for `markdown.highlight`. It renders one `span.line` + * per line, with the colors of both themes in CSS variables. + */ +export function createCodeHighlighter(): CodeHighlighter { + // The colors of the block depend on the themes alone. + const preStyle = escapeAttribute(codeToTokens('', { lang: 'text', ...OPTIONS }).rootStyle ?? ''); + const preClass = 'shiki shiki-themes github-light github-dark'; + + return (code, lang, attrs) => { + // The language may carry the line range: `ts{1,3}`. + const name = /^[a-zA-Z0-9-_]+/.exec(lang)?.[0] ?? ''; + attrs = `${lang.slice(name.length)} ${attrs}`; + lang = name.toLowerCase() || 'txt'; + // The build stops here, because nothing else reports a block that would + // render without colors. VitePress does not apply `languageAlias` to a + // highlighter of our own. + if (!isSupportedLanguage(lang)) { + throw new Error(`The docs highlighter has no language '${lang}'. Use one that it has.`); + } + + const tokensByLine = codeToTokens(code.trimEnd(), { lang: lang as Lang, ...OPTIONS }).tokens; + const highlighted = metaHighlightedRanges(attrs); + const preClasses = new Set(); + const lines: Array = []; + + // Most blocks have neither notations nor a line range. + if (!highlighted && !code.includes('[!code ')) { + for (const tokens of tokensByLine) { + lines.push(renderLine(tokens, 'line')); + } + } else { + // Notations still to apply. One with a `:N` count stays for the lines + // that follow. + let running: Array<{ line: ReadonlyArray; remaining: number }> = []; + tokensByLine.forEach((lineTokens, index) => { + const { tokens, notations } = takeNotations(lineTokens); + for (const entry of notations) { + preClasses.add(entry.pre); + running.push({ line: entry.line, remaining: entry.count }); + } + // A line that held only the comment is dropped, and its notations + // apply from the next line. + if (notations.length > 0 && tokens.every((token) => !/\S/.test(token.content))) { + return; + } + const classes = new Set(['line']); + if (highlighted?.some((range) => index + 1 >= range.from && index + 1 <= range.to)) { + classes.add('highlighted'); + } + for (const entry of running) { + for (const lineClass of entry.line) { + classes.add(lineClass); + } + entry.remaining--; + } + running = running.filter((entry) => entry.remaining > 0); + lines.push(renderLine(tokens, [...classes].join(' '))); + }); + } + + // `v-pre` keeps Vue from reading `{{ }}` in the code. + return ( + `
` +
+      `${lines.join('\n')}
` + ); + }; +} diff --git a/docs/package.json b/docs/package.json index 0a7807d99..f3986bbdf 100644 --- a/docs/package.json +++ b/docs/package.json @@ -10,6 +10,7 @@ }, "devDependencies": { "@iconify/vue": "catalog:", + "@pierre/highlights": "catalog:", "@voidzero-dev/vitepress-theme": "catalog:", "reka-ui": "catalog:", "vitepress": "2.0.0-alpha.20", diff --git a/packages/md/package.json b/packages/md/package.json index 7ea849354..e20177b06 100644 --- a/packages/md/package.json +++ b/packages/md/package.json @@ -41,7 +41,7 @@ "typecheck": "tsc --noEmit --rootDir ../.." }, "dependencies": { - "@pierre/highlights": "^0.5.1", + "@pierre/highlights": "catalog:", "gray-matter": "^4.0.3", "markdown-exit": "catalog:", "markdown-it": "^15.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ef9e9c560..4cb40b492 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -252,6 +252,9 @@ catalogs: '@nkzw/fate': specifier: 2.0.1 version: 2.0.1 + '@pierre/highlights': + specifier: ^0.5.1 + version: 0.5.1 '@react-router/dev': specifier: ^8.5.1 version: 8.5.1 @@ -472,6 +475,9 @@ importers: '@iconify/vue': specifier: 'catalog:' version: 5.0.5(vue@3.5.45(typescript@7.0.2)) + '@pierre/highlights': + specifier: 'catalog:' + version: 0.5.1 '@voidzero-dev/vitepress-theme': specifier: 'catalog:' version: 5.0.7(@voidzero-dev/vite-plus-core@1.6.0(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(sass-embedded@1.104.1)(sass@1.104.1)(terser@5.51.2)(tsx@4.23.15)(typescript@7.0.2)(yaml@2.9.1))(focus-trap@8.2.4)(vitepress@2.0.0-alpha.20(@types/node@26.6.6)(esbuild@0.28.2)(jiti@2.7.0)(postcss@8.5.32)(sass-embedded@1.104.1)(sass@1.104.1)(terser@5.51.2)(tsx@4.23.15)(typescript@7.0.2)(yaml@2.9.1))(vue@3.5.45(typescript@7.0.2)) @@ -587,7 +593,7 @@ importers: packages/md: dependencies: '@pierre/highlights': - specifier: ^0.5.1 + specifier: 'catalog:' version: 0.5.1 gray-matter: specifier: ^4.0.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 58644e6c2..6e21cdcab 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -25,6 +25,7 @@ allowBuilds: catalog: '@cloudflare/workers-types': ^5.20261110.1 '@cloudflare/workers-utils': ^0.53.1 + '@pierre/highlights': ^0.5.1 '@types/node': ^26.6.6 '@voidzero-dev/vite-plus-prompts': 1.6.0 typescript: 7.0.2 From b5e7ce175eba5a8233a600bdb178d6860882f096 Mon Sep 17 00:00:00 2001 From: Kotataro taniguchi <119092698+kotarotaniguchi0523@users.noreply.github.com> Date: Mon, 16 Nov 2026 22:59:31 +0900 Subject: [PATCH 2/4] fix(docs): preserve VitePress Vue fences and shell prompt selection --- docs/.vitepress/highlight.ts | 75 ++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 7 deletions(-) diff --git a/docs/.vitepress/highlight.ts b/docs/.vitepress/highlight.ts index 4c7850b15..c9b10275d 100644 --- a/docs/.vitepress/highlight.ts +++ b/docs/.vitepress/highlight.ts @@ -5,6 +5,7 @@ // This is a fork of `packages/md/src/highlight.ts` with the class names of // VitePress. Mirror fixes to the notation handling there. +import { randomUUID } from 'node:crypto'; import { codeToTokens, isSupportedLanguage } from '@pierre/highlights'; import type { Lang, ThemedToken } from '@pierre/highlights'; import dark from '@pierre/highlights/themes/github-dark'; @@ -154,6 +155,41 @@ function spanOpener(token: ThemedToken): string { return opener; } +// Match VitePress's non-selectable shell prompts while keeping the text for +// its copy button, which strips the prompt from the cloned block. +function disableShellPromptSelection(tokens: ReadonlyArray): ReadonlyArray { + const content = tokens.map((token) => token.content).join(''); + const promptLength = /^ *[$>] /.exec(content)?.[0].length ?? 0; + if (!promptLength) { + return tokens; + } + const result: Array = []; + let remaining = promptLength; + for (const token of tokens) { + if (remaining === 0) { + result.push(token); + continue; + } + const count = Math.min(remaining, token.content.length); + if (count > 0) { + result.push({ + ...token, + content: token.content.slice(0, count), + htmlStyle: { + ...token.htmlStyle, + 'user-select': 'none', + '-webkit-user-select': 'none', + }, + }); + if (count < token.content.length) { + result.push({ ...token, content: token.content.slice(count) }); + } + remaining -= count; + } + } + return result; +} + function renderLine(tokens: ReadonlyArray, classes: string): string { let html = ``; // The theme collapses a line that has no element in it. @@ -200,11 +236,36 @@ export function createCodeHighlighter(): CodeHighlighter { // The build stops here, because nothing else reports a block that would // render without colors. VitePress does not apply `languageAlias` to a // highlighter of our own. + // VitePress uses the -vue suffix to allow Vue interpolation in a fence. + const vueInterpolation = lang.endsWith('-vue'); + if (vueInterpolation) { + lang = lang.slice(0, -4); + } if (!isSupportedLanguage(lang)) { throw new Error(`The docs highlighter has no language '${lang}'. Use one that it has.`); } - const tokensByLine = codeToTokens(code.trimEnd(), { lang: lang as Lang, ...OPTIONS }).tokens; + // Keep mustaches intact for Vue while preventing the lexer from splitting + // an interpolation across spans in the compiled template. + const mustaches = new Map(); + const input = vueInterpolation + ? code.replace(/\{\{.*?\}\}/g, (match) => { + let marker = mustaches.get(match); + if (!marker) { + marker = `vpvue${randomUUID().replaceAll('-', '')}`; + mustaches.set(match, marker); + } + return marker; + }) + : code; + const restoreMustaches = (html: string): string => { + for (const [mustache, marker] of mustaches) { + html = html.replaceAll(marker, mustache); + } + return html; + }; + const tokensByLine = codeToTokens(input.trimEnd(), { lang: lang as Lang, ...OPTIONS }).tokens; + const shell = ['shellscript', 'shell', 'bash', 'sh', 'zsh'].includes(lang); const highlighted = metaHighlightedRanges(attrs); const preClasses = new Set(); const lines: Array = []; @@ -212,7 +273,7 @@ export function createCodeHighlighter(): CodeHighlighter { // Most blocks have neither notations nor a line range. if (!highlighted && !code.includes('[!code ')) { for (const tokens of tokensByLine) { - lines.push(renderLine(tokens, 'line')); + lines.push(renderLine(shell ? disableShellPromptSelection(tokens) : tokens, 'line')); } } else { // Notations still to apply. One with a `:N` count stays for the lines @@ -240,14 +301,14 @@ export function createCodeHighlighter(): CodeHighlighter { entry.remaining--; } running = running.filter((entry) => entry.remaining > 0); - lines.push(renderLine(tokens, [...classes].join(' '))); + lines.push(renderLine(shell ? disableShellPromptSelection(tokens) : tokens, [...classes].join(' '))); }); } - // `v-pre` keeps Vue from reading `{{ }}` in the code. - return ( - `
` +
-      `${lines.join('\n')}
` + // Vue-specific fences allow interpolation; other fences render literally. + return restoreMustaches( + `
` +
+        `${lines.join('\n')}
`, ); }; } From f95fa8c60188c32d3f5bf158bc3b84a6a92fb82c Mon Sep 17 00:00:00 2001 From: Kotataro taniguchi <119092698+kotarotaniguchi0523@users.noreply.github.com> Date: Mon, 16 Nov 2026 23:10:08 +0900 Subject: [PATCH 3/4] style(docs): format highlighter compatibility fix --- docs/.vitepress/highlight.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/.vitepress/highlight.ts b/docs/.vitepress/highlight.ts index c9b10275d..0be6080b5 100644 --- a/docs/.vitepress/highlight.ts +++ b/docs/.vitepress/highlight.ts @@ -157,7 +157,9 @@ function spanOpener(token: ThemedToken): string { // Match VitePress's non-selectable shell prompts while keeping the text for // its copy button, which strips the prompt from the cloned block. -function disableShellPromptSelection(tokens: ReadonlyArray): ReadonlyArray { +function disableShellPromptSelection( + tokens: ReadonlyArray, +): ReadonlyArray { const content = tokens.map((token) => token.content).join(''); const promptLength = /^ *[$>] /.exec(content)?.[0].length ?? 0; if (!promptLength) { @@ -301,7 +303,9 @@ export function createCodeHighlighter(): CodeHighlighter { entry.remaining--; } running = running.filter((entry) => entry.remaining > 0); - lines.push(renderLine(shell ? disableShellPromptSelection(tokens) : tokens, [...classes].join(' '))); + lines.push( + renderLine(shell ? disableShellPromptSelection(tokens) : tokens, [...classes].join(' ')), + ); }); } From b9f53953d733768dbab925bde0a846929a9e78af Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Tue, 17 Nov 2026 09:35:47 +0900 Subject: [PATCH 4/4] Fix JSX annotation comments in docs. --- docs/.vitepress/highlight.ts | 16 +++++++-- docs/test/unit/highlight.test.ts | 57 ++++++++++++++++++++++++++++++++ vite.config.ts | 2 +- 3 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 docs/test/unit/highlight.test.ts diff --git a/docs/.vitepress/highlight.ts b/docs/.vitepress/highlight.ts index 0be6080b5..288d2dfc1 100644 --- a/docs/.vitepress/highlight.ts +++ b/docs/.vitepress/highlight.ts @@ -101,10 +101,13 @@ type Notation = Readonly<{ line: ReadonlyArray; pre: string; count: numb */ function takeNotations( tokens: ReadonlyArray, + lang: string, ): Readonly<{ tokens: Array; notations: ReadonlyArray }> { const notations: Array = []; const kept: Array = []; - for (const token of tokens) { + const jsx = lang === 'jsx' || lang === 'tsx'; + for (let index = 0; index < tokens.length; index++) { + const token = tokens[index]; if (token.type !== TOKEN_COMMENT || !token.content.includes('[!code ')) { kept.push(token); continue; @@ -118,6 +121,15 @@ function takeNotations( ); if (!EMPTY_COMMENT_RE.test(content)) { kept.push(content === token.content ? token : { ...token, content }); + } else if ( + jsx && + kept.at(-1)?.content.trim() === '{' && + tokens[index + 1]?.content.trim() === '}' + ) { + // Empty JSX annotation comments own their expression braces. Remove + // those too so standalone annotations apply to the following code. + kept.pop(); + index++; } } // The space that separated the code from a removed comment goes with it. @@ -282,7 +294,7 @@ export function createCodeHighlighter(): CodeHighlighter { // that follow. let running: Array<{ line: ReadonlyArray; remaining: number }> = []; tokensByLine.forEach((lineTokens, index) => { - const { tokens, notations } = takeNotations(lineTokens); + const { tokens, notations } = takeNotations(lineTokens, lang); for (const entry of notations) { preClasses.add(entry.pre); running.push({ line: entry.line, remaining: entry.count }); diff --git a/docs/test/unit/highlight.test.ts b/docs/test/unit/highlight.test.ts new file mode 100644 index 000000000..ac03d2138 --- /dev/null +++ b/docs/test/unit/highlight.test.ts @@ -0,0 +1,57 @@ +import { describe, expect, it } from 'vite-plus/test'; +import { createCodeHighlighter } from '../../.vitepress/highlight.ts'; + +const highlight = createCodeHighlighter(); + +function renderedLines(code: string, lang: string) { + const html = highlight(code, lang, ''); + const body = html.slice(html.indexOf('') + ''.length, html.indexOf('')); + return body.split('\n').map((line) => ({ + classes: /^]+>/g, '') + .replace(/</g, '<') + .replace(/&/g, '&'), + })); +} + +describe.each(['jsx', 'tsx'])('docs %s annotation comments', (lang) => { + it('removes standalone expression braces before counting highlighted lines', () => { + expect( + renderedLines( + '
\n { /* [!code highlight:2] */ }\n \n \n \n
', + lang, + ), + ).toEqual([ + { classes: 'line', text: '' }, + ]); + }); + + it('removes inline annotation braces while preserving surrounding JSX', () => { + expect(renderedLines('
{/* [!code ++] */}
', lang)).toEqual([ + { classes: 'line diff add', text: '
' }, + ]); + }); + + it('keeps comment expressions with explanatory text', () => { + expect(renderedLines('
{/* keep this [!code focus] */}
', lang)).toEqual([ + { classes: 'line has-focus', text: '
{/* keep this */}
' }, + ]); + }); + + it('keeps function body braces around annotation comments', () => { + expect(renderedLines('function f() {/* [!code focus] */}', lang)).toEqual([ + { classes: 'line has-focus', text: 'function f() {}' }, + ]); + }); + + it('keeps annotation text in string literals', () => { + expect(renderedLines('const text = "{/* [!code highlight] */}";', lang)).toEqual([ + { classes: 'line', text: 'const text = "{/* [!code highlight] */}";' }, + ]); + }); +}); diff --git a/vite.config.ts b/vite.config.ts index 7c7f8fe46..962efb47f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -467,7 +467,7 @@ export default defineConfig({ name: 'unit', fsModuleCache: true, css: { include: [/starter-ui\.css(?:\?|$)/] }, - include: ['packages/*/test/unit/**/*.test.ts'], + include: ['docs/test/unit/**/*.test.ts', 'packages/*/test/unit/**/*.test.ts'], exclude: [...cliUnitTests, ...sdkPgliteUnitTests], sequence: { groupOrder: 2 }, pool: 'threads',