mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
unvendor: Replace moment
This commit is contained in:
@ -16,6 +16,7 @@ import DiffMatchPatch from 'diff-match-patch';
|
||||
import { isProbablyReaderable, Readability } from '@mozilla/readability';
|
||||
import SVGInject from '@iconfu/svg-inject';
|
||||
import showdown from 'showdown';
|
||||
import moment from 'moment';
|
||||
|
||||
/**
|
||||
* Expose the libraries to the 'window' object.
|
||||
@ -58,6 +59,10 @@ export function initLibraryShims() {
|
||||
// @ts-ignore
|
||||
window.showdown = showdown;
|
||||
}
|
||||
if (!('moment' in window)) {
|
||||
// @ts-ignore
|
||||
window.moment = moment;
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
@ -76,6 +81,7 @@ export default {
|
||||
isProbablyReaderable,
|
||||
SVGInject,
|
||||
showdown,
|
||||
moment,
|
||||
};
|
||||
|
||||
export {
|
||||
@ -94,4 +100,5 @@ export {
|
||||
isProbablyReaderable,
|
||||
SVGInject,
|
||||
showdown,
|
||||
moment,
|
||||
};
|
||||
|
Reference in New Issue
Block a user