mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-29 23:02:42 +00:00
fix devMiddleware with baseUrl
This commit is contained in:
parent
25f11a05ab
commit
0895b333ec
@ -149,12 +149,6 @@ export default class Renderer extends Tapable {
|
||||
res.statusCode = 200
|
||||
|
||||
try {
|
||||
// Call webpack middleware only in development
|
||||
if (this.options.dev && this.nuxt.builder && this.nuxt.builder.webpackDevMiddleware) {
|
||||
await this.nuxt.builder.webpackDevMiddleware(req, res)
|
||||
await this.nuxt.builder.webpackHotMiddleware(req, res)
|
||||
}
|
||||
|
||||
// Gzip middleware for production
|
||||
if (this.gzipMiddleware) {
|
||||
await this.gzipMiddleware(req, res)
|
||||
@ -166,6 +160,12 @@ export default class Renderer extends Tapable {
|
||||
req.url = req.url.replace(this.options.router.base, '/')
|
||||
}
|
||||
|
||||
// Call webpack middleware only in development
|
||||
if (this.options.dev && this.nuxt.builder && this.nuxt.builder.webpackDevMiddleware) {
|
||||
await this.nuxt.builder.webpackDevMiddleware(req, res)
|
||||
await this.nuxt.builder.webpackHotMiddleware(req, res)
|
||||
}
|
||||
|
||||
// Serve static/ files
|
||||
await this.serveStatic(req, res)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user