Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mermaid-loader #361

Closed
questsin opened this issue Jun 15, 2016 · 3 comments
Closed

mermaid-loader #361

questsin opened this issue Jun 15, 2016 · 3 comments

Comments

@questsin
Copy link

I'm building a splunk visual and trying to use mermaid for sequence diagrams. splunk uses npm, node.js, webpack.

I think the error is related due to the way mermaid is handling its markdawn like syntax.

tried
"npm run build" got the below error.

ERROR in ./~/mermaid/package.json
Module parse failed: /Applications/Splunk/etc/apps/junk_app/appserver/static/visualizations/junk/node_modules/mermaid/package.json Unexpected token (2:9)
You may need an appropriate loader to handle this file type.

@tylerlong
Copy link
Collaborator

tylerlong commented Jun 4, 2017

Latest version of mermaid has no problem working with webpack, please try again.

Wroking Example: https://github.com/tylingsoft/markdown-core/blob/master/webpack.config.js

Please note that, the following configurations are required:

externals: 'fs', // in order to make mermaid work
plugins: [
    'transform-remove-strict-mode' // in order to make mermaid work
]

In your source code, you can reference mermaid like below:

import 'mermaid'
import 'mermaid/dist/mermaid.css'

@tylerlong
Copy link
Collaborator

Please also check mermaid-webpack-demo.

@pzhbom02
Copy link

@questsin : Where you able to do splunk visuals with mermaid? I am highly interested to do the same!

mgenereu pushed a commit to mgenereu/mermaid that referenced this issue Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants