Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit 797d46f

Browse files
committed
fix: add tsconfig.build.json
1 parent 07f382c commit 797d46f

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
"graphql test mock"
1919
],
2020
"scripts": {
21-
"build": "tsc",
21+
"build": "tsc -p tsconfig.build.json",
2222
"format": "prettier -u --check .",
2323
"format:fix": "prettier -u --write .",
2424
"lint": "eslint src --ext .js,.ts,",
2525
"lint-staged": "lint-staged",
2626
"test": "jest",
2727
"test:coverage": "yarn test --coverage --colors",
28-
"prepare": "husky install && npm run build",
29-
"tsc:check": "tsc",
30-
"prepublish": "tsc",
28+
"prepare": "husky install && yarn build",
29+
"tsc:check": "tsc --noEmit",
30+
"prepublish": "yarn build",
3131
"release": "semantic-release"
3232
},
3333
"peerDependencies": {

tsconfig.build.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES6",
4+
"skipLibCheck": true,
5+
"strict": true,
6+
"esModuleInterop": true,
7+
"module": "commonjs",
8+
"noImplicitAny": true,
9+
"jsx": "react",
10+
"allowSyntheticDefaultImports": true,
11+
"allowJs": true,
12+
"declaration": true,
13+
"emitDeclarationOnly": true,
14+
"noEmit": false,
15+
"outDir": "./dist",
16+
"removeComments": true,
17+
"sourceMap": true,
18+
"resolveJsonModule": true,
19+
"lib": ["dom", "es5", "es6", "es7"],
20+
"baseUrl": ".",
21+
"paths": {
22+
"src/*": ["src/*"]
23+
}
24+
},
25+
"include": ["./src"],
26+
"exclude": ["node_modules", "dist", "./src/__tests__"]
27+
}

tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
"allowSyntheticDefaultImports": true,
1111
"allowJs": true,
1212
"declaration": true,
13-
"emitDeclarationOnly": true,
14-
"noEmit": false,
1513
"outDir": "./dist",
1614
"removeComments": true,
1715
"sourceMap": true,
@@ -23,5 +21,5 @@
2321
}
2422
},
2523
"include": ["./src"],
26-
"exclude": ["node_modules", "dist", "./src/__tests__"]
24+
"exclude": ["node_modules", "dist"]
2725
}

0 commit comments

Comments
 (0)