0
我構建SPA應用程序,並且我在前端的路由器中設置了history
模式。我使用Vue2.js - here是僅描述Express.js的服務器配置的問題,但我不知道如何爲我的Koa2應用程序設置適當的服務器配置。Koa2和歷史API後備
我拿connect-history-api-fallback中間件:
app.use(history());
但我得到的錯誤:
TypeError: next is not a function
然後我用koa2-history-api-fallback
模塊,但didnt't工作eather。
是否有任何解決方法或任何方式來處理此問題。
非常感謝。