feat: add vite-plugin-html to modify template
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title><%= title %></title>
|
||||
<meta name="description" content="<%= description %>" />
|
||||
<link rel="icon" type="image/png" href="<%= logo %>" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
||||
@@ -9,6 +12,18 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<% if (baiduAnalytics) { %>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement('script');
|
||||
hm.src =
|
||||
'https://hm.baidu.com/hm.js?<%= baiduAnalytics.seed %>';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body ontouchstart>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -2,16 +2,9 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<meta
|
||||
name="description"
|
||||
content="<%= htmlWebpackPlugin.options.description %>"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
href="<%= htmlWebpackPlugin.options.logo %>"
|
||||
/>
|
||||
<title><%- title %></title>
|
||||
<meta name="description" content="<%- description %>" />
|
||||
<link rel="icon" type="image/png" href="<%- logo %>" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
||||
@@ -19,6 +12,20 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<% if (baiduAnalytics) { %>
|
||||
<script>
|
||||
// avoid to load analytics in iframe
|
||||
if (window.top === window) {
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement('script');
|
||||
hm.src = 'https://hm.baidu.com/hm.js?<%- baiduAnalytics.seed %>';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
}
|
||||
</script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body ontouchstart>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in New Issue
Block a user