diff --git a/package.json b/package.json index 8fd3ee1..0bbb598 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,20 @@ { "name": "@kilnfi/sdk", - "version": "2.22.1", + "version": "2.23.0", "autor": "Kiln (https://kiln.fi)", "license": "BUSL-1.1", "description": "JavaScript sdk for Kiln API", - "main": "lib/kiln.js", - "types": "lib/kiln.d.ts", + "type": "module", + "exports": { + ".": { + "default": "./lib/kiln.js", + "types": "./lib/kiln.d.ts", + "import": "./lib/kiln.js" + } + }, "scripts": { "lint": "eslint index.ts src/**/*.ts", "lint:fix": "eslint index.ts src/**/*.ts --fix", - "test": "echo \"Error: no test specified\" && exit 1", "build": "tsc" }, "keywords": [ diff --git a/tsconfig.json b/tsconfig.json index 10dfd7a..70250fa 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,18 @@ { "compilerOptions": { - "target": "es6", - "module": "commonjs", + "module": "ES2020", + "target": "ES2021", "declaration": true, "outDir": "./lib", "strict": true, - "esModuleInterop": true, + "esModuleInterop": false, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "verbatimModuleSyntax": false, "moduleResolution": "node", - "skipLibCheck": true + "skipLibCheck": true, + "sourceMap": true, + "rootDir": "src" }, "include": ["src"], "exclude": ["node_modules", "**/__tests__/*", "examples"]