Skip to content

Commit 11ddfa0

Browse files
authored
update build to ES module (#120)
* update build to ES module * bump version
1 parent f11283f commit 11ddfa0

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
22
"name": "@kilnfi/sdk",
3-
"version": "2.22.1",
3+
"version": "2.23.0",
44
"autor": "Kiln <[email protected]> (https://kiln.fi)",
55
"license": "BUSL-1.1",
66
"description": "JavaScript sdk for Kiln API",
7-
"main": "lib/kiln.js",
8-
"types": "lib/kiln.d.ts",
7+
"type": "module",
8+
"exports": {
9+
".": {
10+
"default": "./lib/kiln.js",
11+
"types": "./lib/kiln.d.ts",
12+
"import": "./lib/kiln.js"
13+
}
14+
},
915
"scripts": {
1016
"lint": "eslint index.ts src/**/*.ts",
1117
"lint:fix": "eslint index.ts src/**/*.ts --fix",
12-
"test": "echo \"Error: no test specified\" && exit 1",
1318
"build": "tsc"
1419
},
1520
"keywords": [

tsconfig.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
{
22
"compilerOptions": {
3-
"target": "es6",
4-
"module": "commonjs",
3+
"module": "ES2020",
4+
"target": "ES2021",
55
"declaration": true,
66
"outDir": "./lib",
77
"strict": true,
8-
"esModuleInterop": true,
8+
"esModuleInterop": false,
9+
"allowSyntheticDefaultImports": true,
10+
"forceConsistentCasingInFileNames": true,
11+
"verbatimModuleSyntax": false,
912
"moduleResolution": "node",
10-
"skipLibCheck": true
13+
"skipLibCheck": true,
14+
"sourceMap": true,
15+
"rootDir": "src"
1116
},
1217
"include": ["src"],
1318
"exclude": ["node_modules", "**/__tests__/*", "examples"]

0 commit comments

Comments
 (0)