Skip to content

Commit d208a70

Browse files
author
Nicholas Baroni
committed
Put hotMiddleware before proxyMiddleware in dev server
1 parent 6d57c87 commit d208a70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

template/build/dev-server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ compiler.plugin('compilation', function (compilation) {
4141
})
4242
})
4343

44+
// enable hot-reload and state-preserving
45+
// compilation error display
46+
app.use(hotMiddleware)
47+
4448
// proxy api requests
4549
Object.keys(proxyTable).forEach(function (context) {
4650
var options = proxyTable[context]
@@ -56,10 +60,6 @@ app.use(require('connect-history-api-fallback')())
5660
// serve webpack bundle output
5761
app.use(devMiddleware)
5862

59-
// enable hot-reload and state-preserving
60-
// compilation error display
61-
app.use(hotMiddleware)
62-
6363
// serve pure static assets
6464
var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
6565
app.use(staticPath, express.static('./static'))

0 commit comments

Comments
 (0)