diff --git a/package.json b/package.json index b660fd3..d8cf247 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "scripts": { "start": "rimraf dist && tsc --watch", "build": "rimraf dist && npm run build:esm && npm run build:cjs", - "build:esm": "tsc", - "build:cjs": "tsc --module commonjs --outDir dist/cjs", + "build:esm": "tsc -p tsconfig.build.json", + "build:cjs": "tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs", "test": "jest", "test:watch": "jest --watch", "check-prettier": "prettier --check ./src", diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..84d3c12 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["./dist", "**/*.test.tsx"] +}