mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 07:19:41 +02:00
fix(api): tree shaking package.json import
Manually tree shaking import statement of package.json
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
import { select } from 'd3';
|
import { select } from 'd3';
|
||||||
import { compile, serialize, stringify } from 'stylis';
|
import { compile, serialize, stringify } from 'stylis';
|
||||||
// @ts-ignore: TODO Fix ts errors
|
// @ts-ignore: TODO Fix ts errors
|
||||||
import pkg from '../package.json';
|
import { version } from '../package.json';
|
||||||
import * as configApi from './config';
|
import * as configApi from './config';
|
||||||
import { addDiagrams } from './diagram-api/diagram-orchestration';
|
import { addDiagrams } from './diagram-api/diagram-orchestration';
|
||||||
import classDb from './diagrams/class/classDb';
|
import classDb from './diagrams/class/classDb';
|
||||||
@@ -506,9 +506,9 @@ const render = function (
|
|||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
// Draw the diagram with the renderer
|
// Draw the diagram with the renderer
|
||||||
try {
|
try {
|
||||||
diag.renderer.draw(text, id, pkg.version, diag);
|
diag.renderer.draw(text, id, version, diag);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
errorRenderer.draw(text, id, pkg.version);
|
errorRenderer.draw(text, id, version);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,9 +708,9 @@ const renderAsync = async function (
|
|||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
// Draw the diagram with the renderer
|
// Draw the diagram with the renderer
|
||||||
try {
|
try {
|
||||||
await diag.renderer.draw(text, id, pkg.version, diag);
|
await diag.renderer.draw(text, id, version, diag);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
errorRenderer.draw(text, id, pkg.version);
|
errorRenderer.draw(text, id, version);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user