mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-10 07:44:40 +01:00
Support node16 module resolution
The `node16` module resolution requires imports to use the `.js` file extension in type definitions. `@rollup/plugin-typescript` is needed to make this work with the Vite setup used by Mermaid. The module option for Mermaid internally is set to `nodenext`. This is needed to support `.json` imports. Note that setting `module` to `node16` or `nodenext` implies a matching `moduleResolution` value.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import createLabel from '../createLabel';
|
||||
import { getConfig } from '../../config';
|
||||
import { decodeEntities } from '../../mermaidAPI';
|
||||
import createLabel from '../createLabel.js';
|
||||
import { getConfig } from '../../config.js';
|
||||
import { decodeEntities } from '../../mermaidAPI.js';
|
||||
import { select } from 'd3';
|
||||
import { evaluate, sanitizeText } from '../../diagrams/common/common';
|
||||
import { evaluate, sanitizeText } from '../../diagrams/common/common.js';
|
||||
export const labelHelper = (parent, node, _classes, isNode) => {
|
||||
let classes;
|
||||
if (!_classes) {
|
||||
|
||||
Reference in New Issue
Block a user