Skip to content

Commit

Permalink
add ts-node-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanguinho committed Aug 4, 2021
1 parent 8d357ae commit 482a7ac
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use o IntelliSense para saber mais sobre os atributos possíveis.
// Focalizar para exibir as descrições dos atributos existentes.
// Para obter mais informações, acesse: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
}
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"scripts": {
"start": "node -r dotenv/config dist/main",
"dev": "ts-node-dev --respawn --transpile-only src/main/index.ts",
"dev": "ts-node-dev --respawn --transpile-only -r dotenv/config --inspect=0.0.0.0:9229 src/main",
"clean": "rimraf dist",
"build": "npm run clean && tsc -p tsconfig-build.json",
"prepare": "husky install",
Expand Down
2 changes: 1 addition & 1 deletion src/main/config/module-alias.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addAlias } from 'module-alias'
import { resolve } from 'path'

addAlias('@', resolve('dist'))
addAlias('@', resolve(process.env.TS_NODE_DEV === undefined ? 'dist' : 'src'))

0 comments on commit 482a7ac

Please sign in to comment.