Skip to content

Commit 7d926ea

Browse files
committed
avoid hardcoded path in setup-dev-server.js
1 parent 4a4702c commit 7d926ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build/setup-dev-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ module.exports = function setupDevServer (app, opts) {
2424
})
2525
app.use(devMiddleware)
2626
clientCompiler.plugin('done', () => {
27-
const filename = devMiddleware.getFilenameFromUrl('/dist/index.html')
28-
const index = devMiddleware.fileSystem.readFileSync(filename, 'utf-8')
27+
const filePath = path.join(clientConfig.output.path, 'index.html')
28+
const index = devMiddleware.fileSystem.readFileSync(filePath, 'utf-8')
2929
opts.indexUpdated(index)
3030
})
3131

src/index.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>vue-hackernews-2.0</title>
5+
<title>Vue HN 2.0</title>
66
<meta name="mobile-web-app-capable" content="yes">
77
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
88
<link rel="shortcut icon" sizes="48x48" href="/logo.png">

0 commit comments

Comments
 (0)