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

Only works when using browserify'd code #373

Closed
utdrmac opened this issue Jul 11, 2016 · 1 comment
Closed

Only works when using browserify'd code #373

utdrmac opened this issue Jul 11, 2016 · 1 comment

Comments

@utdrmac
Copy link

utdrmac commented Jul 11, 2016

It seems that browserify is adding additional code to the base that allows Mermaid to work. If I only include mermaid.js on my HTML, I get the following error in JS console:

mermaid.js:9487 Uncaught TypeError: elem.getTransformToElement is not a function

If I create a bundle.js via the following:

asura:slides drmac$ cat mytest.js
mermaid = require('mermaid');

asura:slides drmac$ browserify mytest.js >share/bundle.js

And change nothing else in my HTML except using bundle.js as created above, I get no errors.

What is browserify adding that cannot be included in the standalone mermaid.js? Why is browserify required?

@utdrmac
Copy link
Author

utdrmac commented Jul 11, 2016

Just downloaded the latest 6.0.0 and seems to be working fine without the use of browserify. Excellent!

@utdrmac utdrmac closed this as completed Jul 11, 2016
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

1 participant