Fix types

This commit is contained in:
Sidharth Vinod
2023-02-09 11:28:27 +05:30
parent 08ac41113f
commit 004432fae9
2 changed files with 10 additions and 10 deletions

View File

@@ -20,13 +20,14 @@ const visualizerOptions = (packageName: string, core = false): PluginOption[] =>
if (packageName !== 'mermaid' || !visualize) {
return [];
}
return ['network', 'treemap', 'sunburst'].map((chartType) =>
return ['network', 'treemap', 'sunburst'].map(
(chartType) =>
visualizer({
filename: `./stats/${chartType}${core ? '.core' : ''}.html`,
template: chartType as TemplateType,
gzipSize: true,
brotliSize: true,
})
}) as PluginOption
);
};

View File

@@ -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',