mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +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
|
res.statusCode = 200
|
||||||
|
|
||||||
try {
|
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
|
// Gzip middleware for production
|
||||||
if (this.gzipMiddleware) {
|
if (this.gzipMiddleware) {
|
||||||
await this.gzipMiddleware(req, res)
|
await this.gzipMiddleware(req, res)
|
||||||
@ -166,6 +160,12 @@ export default class Renderer extends Tapable {
|
|||||||
req.url = req.url.replace(this.options.router.base, '/')
|
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
|
// Serve static/ files
|
||||||
await this.serveStatic(req, res)
|
await this.serveStatic(req, res)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user