Skip to content

Commit

Permalink
Merge pull request #4071 from mermaid-js/renovate/vite-4.x
Browse files Browse the repository at this point in the history
chore(deps): update dependency vite to v4
  • Loading branch information
sidharthv96 authored Feb 16, 2023
2 parents 25da0c6 + 004432f commit ac23194
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 48 deletions.
15 changes: 8 additions & 7 deletions .vite/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
"start-server-and-test": "^1.14.0",
"ts-node": "^10.9.1",
"typescript": "^4.8.4",
"vite": "^3.2.3",
"vite": "^4.0.0",
"vitest": "^0.28.4"
},
"volta": {
Expand Down
5 changes: 2 additions & 3 deletions packages/mermaid/src/docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
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';
const resolvedVirtualModuleId = '\0' + virtualModuleId;

export default defineConfig({
plugins: [
SearchPlugin(),
SearchPlugin() as PluginOption,
{
// TODO: will be fixed in the next vitepress release.
name: 'fix-virtual',
Expand Down
40 changes: 3 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac23194

Please sign in to comment.