Skip to content

Commit

Permalink
Put hotMiddleware before proxyMiddleware in dev server (vuejs-templat…
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Baroni authored and frandiox committed Oct 13, 2017
1 parent 42098eb commit a846d07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions template/build/dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ const hotMiddleware = require('webpack-hot-middleware')(compiler, {
// })
// })
// enable hot-reload and state-preserving
// compilation error display
app.use(hotMiddleware)
// proxy api requests
Object.keys(proxyTable).forEach(function (context) {
const options = proxyTable[context]
Expand All @@ -60,10 +64,6 @@ app.use(require('connect-history-api-fallback')())
// serve webpack bundle output
app.use(devMiddleware)
// enable hot-reload and state-preserving
// compilation error display
app.use(hotMiddleware)
// serve pure static assets
const staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory)
app.use(staticPath, express.static('./static'))
Expand Down

0 comments on commit a846d07

Please sign in to comment.