gpt4 book ai didi

nodemon 不监视 tsx 文件中的更改

转载 作者:行者123 更新时间:2023-12-05 01:17:57 25 4
gpt4 key购买 nike

我正在尝试测试我的 typescript react 应用程序,并且我有 nodemon 在 .ts 文件上运行 jasmine 测试,但我无法让 .tsx 触发 watch Action 。

我的 package.json 有一个相当简单的

"test": "cross-env NODE_ENV=test jasmine-ts **/*.spec.ts*",
"test-watch": "nodemon -e ts -w ./ -x npm run test",

我认为 spec.ts* 末尾的 * 会告诉 nodemon 在 .ts 上重新运行,以及.tsx 但这似乎不起作用。

.tsx 也没有?

最佳答案

原来为 nodemon 写这个的正确方法是"test-watch": "nodemon -e ts,tsx -w ./-x npm run test",

关于nodemon 不监视 tsx 文件中的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47916714/

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