Skip to content

Commit ccdd23c

Browse files
author
Guillaume Chau
committed
refactor: middlewares => extendServer
1 parent 3e17b44 commit ccdd23c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ module.exports = (app, options) => {
8888
}
8989
})
9090

91-
config.middlewares.forEach(middleware => {
92-
app.use(middleware)
93-
})
91+
if (config.extendServer) {
92+
config.extendServer(app)
93+
}
9494

9595
// Render the Vue app using the bundle renderer
9696
const renderApp = (req, res) => {

lib/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ module.exports = {
88
favicon: './public/favicon.ico',
99
skipRequests: req => req.originalUrl === '/graphql',
1010
nodeExternalsWhitelist: [/\.css$/, /\?vue&type=style/],
11+
extendServer: null,
1112
// Paths
1213
distPath: null,
1314
templatePath: null,
1415
serviceWorkerPath: null,
15-
middlewares: [],
1616
}

0 commit comments

Comments
 (0)