chore: purify

This commit is contained in:
Lewis Crichton 2023-09-25 18:49:38 +01:00
parent f8232694e7
commit 91e093a21d
No known key found for this signature in database

View file

@ -88,7 +88,7 @@ export const shikiOnigasmSrc = "https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wa
// @ts-expect-error // @ts-expect-error
export const getStegCloak = /* #__PURE__*/ makeLazy(() => import("https://unpkg.com/stegcloak-dist@1.0.0/index.js")); export const getStegCloak = /* #__PURE__*/ makeLazy(() => import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"));
export const getStylus = makeLazy(async () => { export const getStylus = /* #__PURE__*/ makeLazy(async () => {
const stylusScript = await fetch("https://unpkg.com/stylus-lang-bundle@0.58.1/dist/stylus-renderer.min.js").then(r => r.text()); const stylusScript = await fetch("https://unpkg.com/stylus-lang-bundle@0.58.1/dist/stylus-renderer.min.js").then(r => r.text());
// the stylus bundle doesn't have a header that checks for export conditions so we can just patch the script to // the stylus bundle doesn't have a header that checks for export conditions so we can just patch the script to
// return the renderer itself // return the renderer itself
@ -96,7 +96,7 @@ export const getStylus = makeLazy(async () => {
return Function(patchedScript)() as typeof StylusRenderer; return Function(patchedScript)() as typeof StylusRenderer;
}); });
export const getLess = makeLazy(async () => { export const getLess = /* #__PURE__*/ makeLazy(async () => {
const lessScript = await fetch("https://unpkg.com/less@4.2.0/dist/less.min.js").then(r => r.text()); const lessScript = await fetch("https://unpkg.com/less@4.2.0/dist/less.min.js").then(r => r.text());
const module = { exports: {} }; const module = { exports: {} };
Function("module", "exports", lessScript)(module, module.exports); Function("module", "exports", lessScript)(module, module.exports);