Skip to content

Commit a2c3f4d

Browse files
committed
Move to ESM
1 parent 6cd78ce commit a2c3f4d

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "typedoc-plugin-extras",
33
"version": "3.1.0",
44
"description": "A TypeDoc plugin to add extras (favicon, description, generation date...) to the output documentation",
5+
"type": "module",
56
"main": "./dist/main.js",
67
"exports": "./dist/main.js",
78
"types": "./dist/main.d.ts",

src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Application } from "typedoc";
2-
import type { PluginOptions } from "./main";
2+
import type { PluginOptions } from "./main.js";
33

44
/**
55
* Creates a relative path from a host file to a target file which is located in the root.

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
getLastModifiedScript,
1313
getDateTimeScript,
1414
deprecatedOption,
15-
} from './helpers';
15+
} from './helpers.js';
1616

1717
const TYPEDOC_VERSION = Application.VERSION;
1818

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"compilerOptions": {
33
"target": "es2018",
4-
"module": "commonjs",
4+
"module": "node16",
55
"isolatedModules": true,
66
"esModuleInterop": true,
77
"forceConsistentCasingInFileNames": true,
88
"skipLibCheck": true,
99
"strict": true,
1010
"sourceMap": true,
11-
"outDir": "dist"
11+
"outDir": "dist",
12+
"verbatimModuleSyntax": true,
1213
},
1314
"include": [
1415
"src/*.ts"

0 commit comments

Comments
 (0)