typescript config
//type config configuration
{
"compilerOptions": {
"baseUrl": "./",
"outDir": "build",
"module": "ESNext",
"moduleResolution": "node",
"target": "ESNext",
"lib": ["ESNext"],
"typeRoots": ["node_modules/@types"],
"strict": true,
"esModuleInterop": true,
"downlevelIteration": true,
"skipLibCheck": true,
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"importHelpers": true,
"noImplicitAny": false,
"noUnusedParameters": false
},
"exclude": ["node_modules"],
"include": ["src/**/*.ts"],
"paths": {
"tslib": ["node_modules/tslib/tslib.d.ts"]
},
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
},
"files": true,
"pretty": true,
"typeCheck": true
}
}
// my package.json
{
"name": "express-ts-pattern",
"version": "1.0.0",
"description": "strong object oriented using typescript",
"scripts": {
"build": "webpack --config webpack-config.js -p",
"start": "tsnd --watch src/**/*.ts -P tsconfig.json -T src/index.ts",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "restuwahyu13"
},
"keywords": [
"node",
"express",
"express-ts"
],
"author": "restuwahyu13",
"license": "MIT",
"dependencies": {
"body-parser": "^1.19.0",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"mongoose": "^5.9.27",
"typescript": "^3.9.7"
},
"devDependencies": {
"@babel/core": "^7.11.0",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-transform-async-to-generator": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@types/body-parser": "^1.19.0",
"@types/express": "^4.17.7",
"@types/mongoose": "^5.7.34",
"@types/morgan": "^1.9.1",
"@types/node": "^14.0.27",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"morgan": "^1.10.0",
"terser-webpack-plugin": "^3.0.8",
"ts-node": "^8.10.2",
"ts-node-dev": "^1.0.0-pre.58",
"tslib": "^2.0.1",
"webpack-node-externals": "^2.5.0"
}
}