Fixed nodemon + TS incompatability

This commit is contained in:
Saud Fatayerji
2023-11-11 13:33:49 +03:00
parent 458e9ed75b
commit 2cb2116940
5 changed files with 9 additions and 7 deletions

View File

@@ -6,7 +6,7 @@
"scripts": {
"build": "npx tsc",
"start": "node dist/index.js",
"dev": "nodemon index.ts"
"dev": "nodemon --watch './**/*.ts' --exec 'node --experimental-specifier-resolution=node --loader ts-node/esm' ./index.ts"
},
"keywords": [],
"author": "",
@@ -26,5 +26,7 @@
"@types/express": "^4.17.21",
"ts-node-dev": "^2.0.0",
"typescript": "^5.2.2"
}
},
"exports": "./dist/index.js",
"type": "module"
}

View File

@@ -25,9 +25,9 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "ES2020", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */