diff --git a/package.json b/package.json index fb75289..6cabc62 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,10 @@ "import": "./dist/index.js", "require": "./dist/index.cjs" }, - "types": "dist/index.d.ts", "scripts": { "build": "npm run build:bundle && npm run build:types", "build:bundle": "rollup -c rollup.config.js", - "build:types": "tsc -b tsconfig.decl.json", + "build:types": "tsc -b tsconfig.decl.json && tsc -b tsconfig.decl.cts.json", "test:unit": "NODE_ENV=test mocha", "test:lint": "eslint .", "test:types": "tsc -b", diff --git a/tsconfig.decl.cts.json b/tsconfig.decl.cts.json new file mode 100644 index 0000000..13409f0 --- /dev/null +++ b/tsconfig.decl.cts.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "noEmit": false, + "declaration": true, + "emitDeclarationOnly": true + }, + "files": [ + "dist/index.cjs" + ] +}