mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 12:54:08 +01:00 
			
		
		
		
	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.
		
			
				
	
	
		
			15 lines
		
	
	
		
			348 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			348 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
// @ts-ignore: TODO Fix ts errors
 | 
						|
import parser from './parser/exampleDiagram.jison';
 | 
						|
import * as db from './exampleDiagramDb.js';
 | 
						|
import renderer from './exampleDiagramRenderer.js';
 | 
						|
import styles from './styles.js';
 | 
						|
import { injectUtils } from './mermaidUtils.js';
 | 
						|
 | 
						|
export const diagram = {
 | 
						|
  db,
 | 
						|
  renderer,
 | 
						|
  parser,
 | 
						|
  styles,
 | 
						|
  injectUtils,
 | 
						|
};
 |