Skip to content

Commit

Permalink
fix: load JS for transformer plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
gera2ld committed Dec 19, 2024
1 parent f88108b commit a3df80d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mkdocs_markmap/static_files/mkdocs-markmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
const assets = transformer.getAssets();
const loading = Promise.all([
assets.styles && markmap.loadCSS(assets.styles),
assets.scripts && markmap.loadJS(assets.scripts),
markmap.loadJS([
...transformer.plugins.flatMap(
(plugin) => plugin.config?.preloadScripts || []
),
...(assets.scripts || []),
]),
]);

function parseData(content) {
Expand Down

0 comments on commit a3df80d

Please sign in to comment.