52 lines
1.9 KiB
HTML
52 lines
1.9 KiB
HTML
<!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.png">
|
||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
|
||
<script>
|
||
(function() {
|
||
const rawUrl= window.location.href.split('#')[0]
|
||
const basePath = rawUrl.endsWith('/') ? rawUrl : rawUrl + '/';
|
||
// 处理basePath
|
||
window.__BASE_PATH__ = basePath;
|
||
})();
|
||
</script>
|
||
<script>
|
||
(function(){
|
||
const assetsList = []//inject
|
||
const basePath = window.__BASE_PATH__;
|
||
// 如果是js开头则创建script标签,css开头则创建link标签
|
||
assetsList.forEach((item) => {
|
||
const tag = item.startsWith('js') ? 'script' : 'link';
|
||
const el = document.createElement(tag);
|
||
if (tag === 'script') {
|
||
el.src = basePath + item;
|
||
el.async = true;
|
||
} else {
|
||
el.rel = 'stylesheet';
|
||
el.href = basePath + item;
|
||
}
|
||
document.head.appendChild(el);
|
||
});
|
||
})()
|
||
</script>
|
||
</head>
|
||
|
||
<script>
|
||
// Additional script to handle dynamic loading
|
||
console.log("Dynamic loading script initialized.");
|
||
</script>
|
||
<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>
|