mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 06:49:47 +02:00
Fix types
This commit is contained in:
@@ -20,13 +20,14 @@ const visualizerOptions = (packageName: string, core = false): PluginOption[] =>
|
|||||||
if (packageName !== 'mermaid' || !visualize) {
|
if (packageName !== 'mermaid' || !visualize) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
return ['network', 'treemap', 'sunburst'].map((chartType) =>
|
return ['network', 'treemap', 'sunburst'].map(
|
||||||
|
(chartType) =>
|
||||||
visualizer({
|
visualizer({
|
||||||
filename: `./stats/${chartType}${core ? '.core' : ''}.html`,
|
filename: `./stats/${chartType}${core ? '.core' : ''}.html`,
|
||||||
template: chartType as TemplateType,
|
template: chartType as TemplateType,
|
||||||
gzipSize: true,
|
gzipSize: true,
|
||||||
brotliSize: true,
|
brotliSize: true,
|
||||||
})
|
}) as PluginOption
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import { defineConfig, searchForWorkspaceRoot } from 'vite';
|
import { defineConfig, type PluginOption, searchForWorkspaceRoot } from 'vite';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
// @ts-ignore: still in alpha
|
|
||||||
import { SearchPlugin } from 'vitepress-plugin-search';
|
import { SearchPlugin } from 'vitepress-plugin-search';
|
||||||
|
|
||||||
const virtualModuleId = 'virtual:mermaid-config';
|
const virtualModuleId = 'virtual:mermaid-config';
|
||||||
@@ -8,7 +7,7 @@ const resolvedVirtualModuleId = '\0' + virtualModuleId;
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
SearchPlugin(),
|
SearchPlugin() as PluginOption,
|
||||||
{
|
{
|
||||||
// TODO: will be fixed in the next vitepress release.
|
// TODO: will be fixed in the next vitepress release.
|
||||||
name: 'fix-virtual',
|
name: 'fix-virtual',
|
||||||
|
Reference in New Issue
Block a user