Tue, July 16, 2019
My tsconfig.json
I tried to make it work best for both Node.js runtime and web browser.
A result is (https://github.com/szokodiakos/typegoose/issues/187)
// tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"outDir": "./build",
"strict": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": false,
"noImplicitReturns": true,
"noImplicitAny": true,
"allowJs": true,
"resolveJsonModule": true,
"downlevelIteration": true
},
"include": [
"src/**/*"
]
}
// tsconfig.node.json
{
"extends": "./tsconfig.json",
"exclude": [
"src/web"
]
}
// tsconfig.web.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist/",
"sourceMap": true,
"target": "es5",
"lib": ["es2015", "es2017", "dom"]
},
"exclude": [
"src/node"
]
}
// tsconfig.electron.json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": false
}
}