"Unpinned dependencies just broke my plugin" was originally published on kevingimbel.de.


Unpinned dependencies just broke my plugin

Hello and welcome to a little recap! My 11ty MermaidJS plugin was just broken by MermaidJS release 10.0 because they no longer provided a minified JavaScript bundle and instead only provide a ESM module.

My plugin was referencing https://unpkg.com/mermaid/dist/mermaid.min.js by default for including the javascript code, but with version 10 this now leads to a 404 on unpkg.com, resulting in the plugin breaking for everyone using it. Oops. 😬

As a quick fix I’ve moved the code to use the ESM module instead, which luckily was fairy straight forward. The change can be seen on GitHub here https://github.com/KevinGimbel/eleventy-plugin-mermaid/commit/3f356d603dafb0801c4fe90ff75aa0a54f73eceb

I should’ve know better than to reference the latest version by default, but sometimes I’m lazy and I initially developed the plugin for my self without thinking much about it.

Sorry if I broke your website. 🖤