mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-06 23:59:37 +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:
@@ -1,5 +1,5 @@
|
||||
import mermaid2 from '../../packages/mermaid/src/mermaid';
|
||||
import externalExample from '../../packages/mermaid-example-diagram/src/detector';
|
||||
import mermaid2 from '../../packages/mermaid/src/mermaid.js';
|
||||
import externalExample from '../../packages/mermaid-example-diagram/src/detector.js';
|
||||
|
||||
function b64ToUtf8(str) {
|
||||
return decodeURIComponent(escape(window.atob(str)));
|
||||
|
Reference in New Issue
Block a user