Skip to content

Commit 128aa68

Browse files
committed
Revert "Try to make entire distribution ESM compliant. Might blow everything up. We'll see!"
This reverts commit fcbd996.
1 parent fcbd996 commit 128aa68

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "1.0.0-beta",
44
"description": "node.js lambda with DynamoDB",
55
"main": "??",
6-
"type": "module",
76
"scripts": {
87
"test": "echo \"Error: no test specified\" && exit 1",
98
"build-ts": "tsc",

utils/thumbnails.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ import i18n from 'i18next';
1313
import enBack from "../locales/en/apback.json";
1414
import { registerWindow, SVG, Svg } from "@svgdotjs/svg.js";
1515
import { APRenderRep, type IRenderOptions, addPrefix, render } from "@abstractplay/renderer";
16-
import { createSVGWindow } from 'svgdom';
17-
import { customAlphabet } from 'nanoid';
18-
const alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
19-
const generateId = customAlphabet(alphabet, 5);
2016

2117
const REGION = "us-east-1";
2218
const s3 = new S3Client({region: REGION});
@@ -313,6 +309,9 @@ export const handler: Handler = async (event: any, context?: any) => {
313309
["light", contextLight],
314310
["dark", contextDark],
315311
]);
312+
const generateId = await makeIdGenerator();
313+
const svgdom = await import('svgdom');
314+
const { createSVGWindow } = svgdom;
316315
const window = createSVGWindow();
317316
const document = window.document;
318317

0 commit comments

Comments
 (0)