gpt4 book ai didi

javascript - Nodemon ts-node 无法监视 JavaScript 更改

转载 作者:行者123 更新时间:2023-11-30 13:54:34 26 4
gpt4 key购买 nike

这是我的 nodemon.json:

{
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node ./src/index.ts"
}

我的项目有 js 和 ts 文件,我希望它也能观察 js 文件中的变化,但它只会在我更改 index.ts 时重新启动

最佳答案

尝试以下 nodemon.json:

{
"watch": ["src"],
"ext": "js,ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node ./src/index.ts"
}

关于javascript - Nodemon ts-node 无法监视 JavaScript 更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57561658/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com