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