Skip to content

Commit 9a7563b

Browse files
committed
And another try! Sorry. I should have staged all this differently. So many commits!
1 parent d187c5b commit 9a7563b

File tree

6 files changed

+17
-38
lines changed

6 files changed

+17
-38
lines changed

lib/nanoid-wrapper.mjs

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/svgdom-wrapper.mjs

Lines changed: 0 additions & 7 deletions
This file was deleted.

serverless.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ params:
4141

4242
package:
4343
excludeDevDependencies: false
44-
include:
45-
- lib/svgdom-wrapper.mjs
46-
- lib/nanoid-wrapper.mjs
47-
- types/types.d.ts
44+
# include:
45+
# - lib/svgdom-wrapper.mjs
46+
# - lib/nanoid-wrapper.mjs
47+
# - types/**
4848

4949
plugins:
5050
- serverless-plugin-common-excludes

tsconfig.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,19 @@
2525
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
2626

2727
/* Modules */
28-
"module": "commonjs", /* Specify what module code is generated. */
28+
"module": "Node16", /* Specify what module code is generated. */
2929
// "rootDir": "./", /* Specify the root folder within your source files. */
30-
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
30+
"moduleResolution": "Node16", /* Specify how TypeScript looks up a file from a given module specifier. */
3131
"baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32-
"paths": {
33-
"svgdom-wrapper": ["lib/svgdom-wrapper.mjs"],
34-
"nanoid-wrapper": ["lib/nanoid-wrapper.mjs"],
35-
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
32+
// "paths": {
33+
// "../lib/svgdom-wrapper.mjs": ["lib/svgdom-wrapper.d.ts"],
34+
// "../lib/nanoid-wrapper.mjs": ["lib/nanoid-wrapper.d.ts"],
35+
// },
36+
// "svgdom-wrapper": ["lib/svgdom-wrapper.mjs"],
37+
// "nanoid-wrapper": ["lib/nanoid-wrapper.mjs"],
38+
// }, /* Specify a set of entries that re-map imports to additional lookup locations. */
3639
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
37-
// "typeRoots": ["./types/*"], /* Specify multiple folders that act like './node_modules/@types'. */
40+
// "typeRoots": ["./types"], /* Specify multiple folders that act like './node_modules/@types'. */
3841
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
3942
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
4043
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
@@ -103,5 +106,5 @@
103106
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
104107
"skipLibCheck": true /* Skip type checking all .d.ts files. */
105108
},
106-
"include": ["src", "lib", "utils", "types"],
109+
"include": ["src", "lib", "utils"],
107110
}

types/types.d.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

utils/thumbnails.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ export const handler: Handler = async (event: any, context?: any) => {
297297
["dark", contextDark],
298298
]);
299299
// Dynamically import the ESM wrapper
300-
const { makeWindow } = await import('svgdom-wrapper');
300+
const { makeWindow } = await import("../lib/svgdom-wrapper.js");
301301
// Example: generate an ID using nanoid wrapper
302-
const { generateId } = await import('nanoid-wrapper');
302+
const { generateId } = await import("../lib/nanoid-wrapper.js");
303303
const window = makeWindow();
304304
const document = window.document;
305305

0 commit comments

Comments
 (0)