mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-09 03:03:18 +00:00
fix(renderer): resolve handler key as option for serverMiddleware
#1274
This commit is contained in:
parent
8dca5ec81e
commit
459363beea
@ -174,6 +174,10 @@ export default class Renderer extends Tapable {
|
||||
if (typeof m === 'string') {
|
||||
m = require(this.nuxt.resolvePath(m))
|
||||
}
|
||||
// Handler
|
||||
if (m && typeof m.handler === 'string') {
|
||||
m.handler = require(this.nuxt.resolvePath(m.handler))
|
||||
}
|
||||
// Use middleware
|
||||
if (m instanceof Function) {
|
||||
this.app.use(m)
|
||||
|
Loading…
Reference in New Issue
Block a user