vue教程:index.html说明

说明

public/index.html 文件解释:

<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <!-- 针对IE浏览器的设置,让其能够正常显示vue -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 适配移动端显示页面 -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <!-- 显示.ico图标,BASE_URL指public的url -->
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <!-- 读取 vue.config.js 的 title 属性值 -->
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <!-- 当浏览器不支持js时,显示下面内容 -->
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <!-- 容器 -->
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
</html>

解释: <%= htmlWebpackPlugin.options.title %></title> 读取 vue.config.js 文件中的配置,详见 链接


原文出处:/show_1IX2hWIPlSCp.html