Commit 7d926ead authored by Evan You's avatar Evan You

avoid hardcoded path in setup-dev-server.js

parent 4a4702c8
......@@ -24,8 +24,8 @@ module.exports = function setupDevServer (app, opts) {
})
app.use(devMiddleware)
clientCompiler.plugin('done', () => {
const filename = devMiddleware.getFilenameFromUrl('/dist/index.html')
const index = devMiddleware.fileSystem.readFileSync(filename, 'utf-8')
const filePath = path.join(clientConfig.output.path, 'index.html')
const index = devMiddleware.fileSystem.readFileSync(filePath, 'utf-8')
opts.indexUpdated(index)
})
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>vue-hackernews-2.0</title>
<title>Vue HN 2.0</title>
<meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<link rel="shortcut icon" sizes="48x48" href="/logo.png">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment