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

package.json main setting change enables svelte-kit / vite support #3009

Closed
netfl0 opened this issue May 6, 2022 · 2 comments · Fixed by #3338
Closed

package.json main setting change enables svelte-kit / vite support #3009

netfl0 opened this issue May 6, 2022 · 2 comments · Fixed by #3338
Labels
Status: Triage Needs to be verified, categorized, etc Type: Other Not an enhancement or a bug

Comments

@netfl0
Copy link

netfl0 commented May 6, 2022

I was unable to get mermaid imports working in a svelte/kit webapp until I changed main in package.json to point to dist/mermaid.js instead of the current default of dist/mermaid.core.js

This change set on develop is working for me: d3fend@426d9f3

I am sure you point main to dist/mermaid.core.js for a reason, but, probably due to my ignorance, it was not obvious to me. Hopefully this helps someone else who might run into this issue.

I am using all the latest version of svelte-kit, vite, and mermaid (develop branch as of today).

"@sveltejs/kit": "next",
"vite": "^2.9.0"

(I am a bit new to the javascript packaging ecosystem)

@netfl0 netfl0 added the Type: Other Not an enhancement or a bug label May 6, 2022
@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label May 6, 2022
@sidharthv96
Copy link
Member

sidharthv96 commented May 6, 2022

We're using latest sveltekit in live editor. You could take a look at the config there.
It was indeed a bit tricky to get things to work.

https://github.com/mermaid-js/mermaid-live-editor

This line might be helpful. https://github.com/mermaid-js/mermaid-live-editor/blob/c4caf7d7ba0d29f40d2219bfb1c99592a24a4d67/svelte.config.js#L25

@netfl0
Copy link
Author

netfl0 commented May 8, 2022

Thank you. To clarify, I was able to get it to work with simple change I linked to, I was just wondering why this change was not already present in mermaid.

sidharthv96 added a commit that referenced this issue Aug 21, 2022
knsv added a commit that referenced this issue Aug 21, 2022
Fix #3009 Update main in package.json
sidharthv96 added a commit that referenced this issue Aug 21, 2022
* develop:
  Fix #3009 Update main
  #3243 Adding disabled testcase for diagram with leading \n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Other Not an enhancement or a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants