mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 13:59:54 +02: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:
@@ -24,12 +24,12 @@ import {
|
||||
curveStepBefore,
|
||||
select,
|
||||
} from 'd3';
|
||||
import common from './diagrams/common/common';
|
||||
import { configKeys } from './defaultConfig';
|
||||
import { log } from './logger';
|
||||
import { detectType } from './diagram-api/detectType';
|
||||
import assignWithDepth from './assignWithDepth';
|
||||
import { MermaidConfig } from './config.type';
|
||||
import common from './diagrams/common/common.js';
|
||||
import { configKeys } from './defaultConfig.js';
|
||||
import { log } from './logger.js';
|
||||
import { detectType } from './diagram-api/detectType.js';
|
||||
import assignWithDepth from './assignWithDepth.js';
|
||||
import { MermaidConfig } from './config.type.js';
|
||||
import memoize from 'lodash-es/memoize.js';
|
||||
|
||||
// Effectively an enum of the supported curve types, accessible by name
|
||||
|
Reference in New Issue
Block a user