This PR removes the import of the mermaid dependency and does not build it into the main.js file, as this causes the main.js file to become very large. Additionally, due to the current front-end plugin mechanism of Halo, we cannot use es module and dynamic import, resulting in an increasingly large bundle.js for plugins.
This PR changes the loading of mermaid resources in the editor to be consistent with the loading method used on the theme side.
Before:
After:
/kind improvement
Remove mermaid imports to resolve bundle size issue
Needs approval from an approver in each of these files:
- ~~[OWNERS](https://github.com/halo-sigs/plugin-text-diagram/blob/main/OWNERS)~~ [JohnNiang]
Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
This PR removes the import of the mermaid dependency and does not build it into the main.js file, as this causes the main.js file to become very large. Additionally, due to the current front-end plugin mechanism of Halo, we cannot use es module and dynamic import, resulting in an increasingly large bundle.js for plugins.
This PR changes the loading of mermaid resources in the editor to be consistent with the loading method used on the theme side.
Before:
After:
/kind improvement