{"componentChunkName":"component---src-templates-post-tsx","path":"/posts/2019/07/my-tsconfig.json/","result":{"data":{"markdownRemark":{"fields":{"slug":"/2019/07/my-tsconfig.json/"},"frontmatter":{"title":"My tsconfig.json","tag":["tsconfig.json","typescript","pinned"],"image":"https://3.bp.blogspot.com/-mbCB4VKUAT8/WvB5ZZoslaI/AAAAAAAAUAA/10O-BO8ynwgwf0RPGJiZDkduOw9QqKo8ACLcBGAs/s1600/typescript-configuration-file-tsconfig-json.jpg"},"correctedDateEpoch":1563296400000,"html":"<p>I tried to make it work best for both Node.js runtime and web browser.</p>\n<!-- excerpt_separator -->\n<p>A result is (<a href=\"https://github.com/szokodiakos/typegoose/issues/187\">https://github.com/szokodiakos/typegoose/issues/187</a>)</p>\n<pre><code class=\"language-json\">// tsconfig.json\n{\n    \"compilerOptions\": {\n        \"target\": \"esnext\",\n        \"module\": \"commonjs\",\n        \"outDir\": \"./build\",\n        \"strict\": true,\n        \"esModuleInterop\": true,\n        \"emitDecoratorMetadata\": true,\n        \"experimentalDecorators\": true,\n        \"allowSyntheticDefaultImports\": true,\n        \"sourceMap\": false,\n        \"noImplicitReturns\": true,\n        \"noImplicitAny\": true,\n        \"allowJs\": true,\n        \"resolveJsonModule\": true,\n        \"downlevelIteration\": true\n    },\n    \"include\": [\n        \"src/**/*\"\n    ]\n}\n</code></pre>\n<pre><code class=\"language-json\">// tsconfig.node.json\n{\n    \"extends\": \"./tsconfig.json\",\n    \"exclude\": [\n        \"src/web\"\n    ]\n}\n</code></pre>\n<pre><code class=\"language-json\">// tsconfig.web.json\n{\n    \"extends\": \"./tsconfig.json\",\n    \"compilerOptions\": {\n        \"outDir\": \"dist/\",\n        \"sourceMap\": true,\n        \"target\": \"es5\",\n        \"lib\": [\"es2015\", \"es2017\", \"dom\"]\n    },\n    \"exclude\": [\n        \"src/node\"\n    ]\n}\n</code></pre>\n<pre><code class=\"language-json\">// tsconfig.electron.json\n{\n    \"extends\": \"./tsconfig.json\",\n    \"compilerOptions\": {\n        \"sourceMap\": false\n    }\n}\n</code></pre>"}},"pageContext":{"slug":"/2019/07/my-tsconfig.json/"}}}