diff --git a/package.json b/package.json index 3d6c6c9..128c261 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "scripts": { "build": "npm run lint && npm run compile", - "compile": "tsc", + "compile": "tsc -p ./tsconfig.build.json", "lint": "eslint --ext .ts --ext .tsx src" }, "repository": { diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..e496abd --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,29 @@ +{ + "extends": "@codingame/tsconfig", + "compilerOptions": { + "outDir": "dist/", + "rootDir": "src/", + "declaration": true, + "skipLibCheck": true, + "baseUrl": "./src", + "jsx": "react", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "module": "esnext", + "paths": { + "app/*": [ + "*" + ] + }, + "sourceMap": true, + "target": "ES2022" + }, + "include": ["src"], + "exclude": [ + "dist", + "node_modules" + ] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index be4bfad..809248f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,28 +1,4 @@ { - "extends": "@codingame/tsconfig", - "compilerOptions": { - "outDir": "dist/", - "declaration": true, - "skipLibCheck": true, - "baseUrl": "./src", - "jsx": "react", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "module": "esnext", - "paths": { - "app/*": [ - "*" - ] - }, - "sourceMap": true, - "target": "ES2022" - }, - "include": ["src", ".eslintrc.cjs"], - "exclude": [ - "dist", - "node_modules" - ] + "extends": "./tsconfig.build.json", + "include": ["src", ".eslintrc.cjs"] } \ No newline at end of file