-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
32MB in [email protected]/dist/ with duplicate files? #4203
Comments
Hi, according to the snippet Line 120 in 8b37cef
I noticed that in the build process, mermaid build 3 different configs. so the folder size growth to 32MB. This could cause some issues with storage and deployment. Maybe we can put the result in different subfolder or different prefix in the dist folder? |
The majority of the size is |
@ochowei it's done with https://cdn.jsdelivr.net/npm/[email protected]/dist/ @frehberg you'll be able to ship mermaid.tiny.min.js which is only 1.07MB, compared to 3.3MB of mermaid.min.js And all the required chunks of mermaid.esm.min.mjs is now safely inside chunks/mermaid.esm.min/ |
Is this still an open issue? |
Closing due to no response |
Description
When I port Rust-aquamarine from mermaid 9.2 to to mermaid 10.0.2 (mersinvald/aquamarine#35), it seems the JS footprint has grown from 900KB to 32MB. I hope this can be reduced to smaller bytesize, picking the essential files from folder https://unpkg.com/browse/[email protected]/dist/
As stated by release notes, the mermaid package mermaid.min.js has been split into multiple packages, just I hope not all 262 files in folder https://unpkg.com/browse/[email protected]/dist/ are required.
All in all this folder contains 32MB, in contrast to ca 900KB of former mermaid.min.js
As the JS files shall be shipped with the Rust-Library "aquamarine" the size of 32MB is a bit too large.
Please tell me, If the following import statement would be used, which further files does it depend on? What is the JS file-set to be shipped as bundle? Is there a npm-run command to filter out these files as a bundle using an automated process?
Steps to reproduce
Check the content of ttps://unpkg.com/browse/[email protected]/dist/
For me it not clear which files are required if importing https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs
Screenshots
No response
Code Sample
No response
Setup
Additional Context
No response
The text was updated successfully, but these errors were encountered: