unvendor: Replace handlebars

This commit is contained in:
Cohee
2024-10-17 00:34:07 +03:00
parent 1c4e87b25b
commit d5fdf307c8
12 changed files with 53 additions and 5979 deletions

View File

@ -6,6 +6,7 @@ import Fuse from 'fuse.js';
import DOMPurify from 'dompurify';
import hljs from 'highlight.js';
import localforage from 'localforage';
import Handlebars from 'handlebars';
/**
* Expose the libraries to the 'window' object.
@ -32,6 +33,10 @@ export function initLibraryShims() {
// @ts-ignore
window.localforage = localforage;
}
if (!('Handlebars' in window)) {
// @ts-ignore
window.Handlebars = Handlebars;
}
}
export default {
@ -39,6 +44,7 @@ export default {
DOMPurify,
hljs,
localforage,
Handlebars,
};
export {
@ -46,4 +52,5 @@ export {
DOMPurify,
hljs,
localforage,
Handlebars,
};