midwayjs / hooks

"Zero" Api / Type Safe / Fullstack Kit / Powerful Backend
MIT License
689 stars 63 forks source link

发现个小问题,不确定是 bug ,还是我的用法有误 #486

Closed wzy2023 closed 1 year ago

wzy2023 commented 1 year ago

接口有 2 个文件,分别是 user.ts 和 role.ts,它们各自都导出个叫 list 的接口,

dev 时,只有 user/list 接口可调通,role/list 接口为 404

build后,2 个接口都可以调通


所以不太确定是:

  1. 用法有误,即使 2 个文件下,也不应该有同名函数
  2. dev 时生成的 router 有点bug...

大佬们看一下吧~~~

这个是demo:https://github.com/15835196981/midway-test

Lxxyx commented 1 year ago

我看一下

wzy2023 commented 1 year ago

@Lxxyx 大佬看过了吗 咋样呀

Lxxyx commented 1 year ago

@Lxxyx 大佬看过了吗 咋样呀

image

我在我本地试过了,并没有复现此情况