mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
chore: fix router base handling with dev-middleware (closes #8440)
[release]
This commit is contained in:
parent
568f9fddd9
commit
07a6bbe2b0
@ -207,7 +207,10 @@ export class WebpackBundler {
|
|||||||
const name = isModernRequest(req, this.buildContext.options.modern) ? 'modern' : 'client'
|
const name = isModernRequest(req, this.buildContext.options.modern) ? 'modern' : 'client'
|
||||||
|
|
||||||
if (this.devMiddleware && this.devMiddleware[name]) {
|
if (this.devMiddleware && this.devMiddleware[name]) {
|
||||||
|
const { url } = req
|
||||||
|
req.url = req.originalUrl || req.url
|
||||||
await this.devMiddleware[name](req, res)
|
await this.devMiddleware[name](req, res)
|
||||||
|
req.url = url
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.hotMiddleware && this.hotMiddleware[name]) {
|
if (this.hotMiddleware && this.hotMiddleware[name]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user