Skip to content

Commit

Permalink
fix(app-vite): Call SSR injectMiddlewares at the right time to enable…
Browse files Browse the repository at this point in the history
… publicPath middleware
  • Loading branch information
yusufkandemir committed Mar 28, 2022
1 parent 346b855 commit ef9395c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app-vite/lib/modes/ssr/ssr-devserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@ class SsrDevServer extends AppDevserver {
})
})

await injectMiddlewares(middlewareParams)

const { publicPath } = this.#appOptions

publicPath !== '/' && app.use((req, res, next) => {
Expand Down Expand Up @@ -349,6 +347,8 @@ class SsrDevServer extends AppDevserver {
next()
})

await injectMiddlewares(middlewareParams)

const isReady = () => Promise.resolve()

const listenResult = await listen({
Expand Down

0 comments on commit ef9395c

Please sign in to comment.