diff --git a/packages/cli/_templates/app/base/index.js b/packages/cli/_templates/app/base/index.js index 747f6f47f2..f22362a34a 100644 --- a/packages/cli/_templates/app/base/index.js +++ b/packages/cli/_templates/app/base/index.js @@ -45,7 +45,8 @@ module.exports = { '@types/mocha', feathers.framework === 'koa' ? '@types/koa-static' : '@types/compression', '@types/node', - 'ts-node-dev', + 'nodemon', + 'ts-node', 'typescript', 'shx' ); diff --git a/packages/cli/_templates/app/base/ts/package.json.t b/packages/cli/_templates/app/base/ts/package.json.t index daef59283e..4a6cea0492 100644 --- a/packages/cli/_templates/app/base/ts/package.json.t +++ b/packages/cli/_templates/app/base/ts/package.json.t @@ -9,7 +9,7 @@ const pkg = { ...h.pkg, scripts: { ...h.pkg.scripts, - dev: 'ts-node-dev --no-notify ${h.lib}/', + dev: 'nodemon -x ts-node ${h.lib}/index.ts', compile: 'shx rm -rf lib/ && tsc', start: 'npm run compile && node lib/', test: 'mocha test/ --require ts-node/register --recursive --extension .ts --exit' diff --git a/packages/cli/_templates/app/base/ts/tsconfig.json.t b/packages/cli/_templates/app/base/ts/tsconfig.json.t index 4ab2ebe349..df7d7d74c3 100644 --- a/packages/cli/_templates/app/base/ts/tsconfig.json.t +++ b/packages/cli/_templates/app/base/ts/tsconfig.json.t @@ -2,8 +2,11 @@ to: "tsconfig.json" --- { + "ts-node": { + "files": true + }, "compilerOptions": { - "target": "es2018", + "target": "es2020", "module": "commonjs", "outDir": "./lib", "rootDir": "./<%= h.lib %>", @@ -13,4 +16,4 @@ to: "tsconfig.json" "exclude": [ "test" ] -} \ No newline at end of file +}