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) { ...@@ -24,8 +24,8 @@ module.exports = function setupDevServer (app, opts) {
}) })
app.use(devMiddleware) app.use(devMiddleware)
clientCompiler.plugin('done', () => { clientCompiler.plugin('done', () => {
const filename = devMiddleware.getFilenameFromUrl('/dist/index.html') const filePath = path.join(clientConfig.output.path, 'index.html')
const index = devMiddleware.fileSystem.readFileSync(filename, 'utf-8') const index = devMiddleware.fileSystem.readFileSync(filePath, 'utf-8')
opts.indexUpdated(index) opts.indexUpdated(index)
}) })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <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="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> <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"> <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