unvendor: Replace hljs

This commit is contained in:
Cohee
2024-10-16 23:18:23 +03:00
parent 3c28b754dc
commit 416282ae1f
11 changed files with 28 additions and 1365 deletions

View File

@@ -4,6 +4,7 @@
*/
import Fuse from 'fuse.js';
import DOMPurify from 'dompurify';
import hljs from 'highlight.js';
/**
* Expose the libraries to the 'window' object.
@@ -22,14 +23,20 @@ export function initLibraryShims() {
// @ts-ignore
window.DOMPurify = DOMPurify;
}
if (!('hljs' in window)) {
// @ts-ignore
window.hljs = hljs;
}
}
export default {
Fuse,
DOMPurify,
hljs,
};
export {
Fuse,
DOMPurify,
hljs,
};