Skip to content

Commit bc3e4af

Browse files
haoqunjiangpksunkara
authored andcommitted
refactor: use the title option in the html template, instead… (#5060)
closes #5056
1 parent 9ac7ce5 commit bc3e4af

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/@vue/cli-service/generator/template/public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%%= BASE_URL %%>favicon.ico">
8-
<title><%= rootOptions.projectName %></title>
8+
<title><%%= htmlWebpackPlugin.options.title %%></title>
99
</head>
1010
<body>
1111
<noscript>
12-
<strong>We're sorry but <%= rootOptions.projectName %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
12+
<strong>We're sorry but <%%= htmlWebpackPlugin.options.title %%> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1313
</noscript>
1414
<div id="app"></div>
1515
<!-- built files will be auto injected -->

packages/@vue/cli-service/lib/config/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ module.exports = (api, options) => {
8484
}
8585

8686
const htmlOptions = {
87+
title: api.service.pkg.name,
8788
templateParameters: (compilation, assets, pluginOptions) => {
8889
// enhance html-webpack-plugin's built in template params
8990
let stats

0 commit comments

Comments
 (0)