在vue-cli应用中重新创建公共目录

问题描述 投票:0回答:1

public应用程序中意外删除了vue-cli目录。现在,我需要该目录向其中添加一些文件以进行测试。 (例如,添加serviceWorker文件并在index.html脚本标签中对其进行引用)是否有任何命令可以重新创建该公共目录?

vue.js webpack webpack-dev-server vue-cli
1个回答
0
投票

只需创建以下内容:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body>
    <noscript>
      <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>

© www.soinside.com 2019 - 2024. All rights reserved.