R
R
resibe2021-11-19 09:27:45
webpack
resibe, 2021-11-19 09:27:45

How to change template to generate html HtmlWebpackPlugin vue/[email protected] PWA?

Hello my index.html

<!DOCTYPE html>
<html lang="">
  <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" />
    <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>

After generation
<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <title>LevelSoft Official</title>
    <base />
    <!--[if IE]><link rel="icon" href="/favicon.svg" /><![endif]-->
    <link
      rel="icon"
      type="image/png"
      sizes="228x228"
      href="/coast-228x228.png"
    />
    <link rel="icon" type="image/svg+xml" href="/img/icons/favicon.svg" />
    <link
      rel="icon"
      type="image/png"
      sizes="32x32"
      href="/img/icons/favicon-32x32.png"
    />
    <link
      rel="icon"
      type="image/png"
      sizes="16x16"
      href="/img/icons/favicon-16x16.png"
    />
    <link rel="manifest" href="/manifest.json" />
    <meta name="theme-color" content="#4DBA87" />
    <meta name="apple-mobile-web-app-capable" content="no" />
    <meta name="apple-mobile-web-app-status-bar-style" content="default" />
    <meta name="apple-mobile-web-app-title" content="site" />
    <link
      rel="apple-touch-icon"
      href="/img/icons/apple-touch-icon-152x152.png"
    />
    <link
      rel="mask-icon"
      href="/img/icons/safari-pinned-tab.svg"
      color="#4DBA87"
    />
    <meta
      name="msapplication-TileImage"
      content="/img/icons/msapplication-icon-144x144.png"
    />
    <meta name="msapplication-TileColor" content="#000000" />
  </head>
  <body>
    <noscript
      ><strong
        >We're sorry but site doesn't work properly without
        JavaScript enabled. Please enable it to continue.</strong
      ></noscript
    >
    <div id="app"></div>
  </body>
</html>

Actually, I need to change the names of the icons and remove
<!--[if IE]><link rel="icon" href="/favicon.svg" /><![endif]-->

Ps: even using HtmlWebpackPlugin with template: "public/index.html", it still generates links for icons from somewhere and [if IE]... Where...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-11-19
@resibe

Documentation : pwa.iconPaths?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question