移除 vite-plugin-html 插件

This commit is contained in:
hooray
2023-02-22 19:16:50 +08:00
parent 2ab04b1fdf
commit 108073b6e1
12 changed files with 237 additions and 343 deletions
+16
View File
@@ -0,0 +1,16 @@
if (!import.meta.env.DEV) {
const _hmt = []
_hmt.push(['_requirePlugin', 'UrlChangeTracker', {
shouldTrackUrlChange(newPath: any, oldPath: any) {
return newPath && oldPath
},
}]);
(function () {
const hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?c31a3e8267162de8420bc73e06d62463'
const s = document.getElementsByTagName('script')[0]
s.parentNode?.insertBefore(hm, s)
})()
}
export {}
+15
View File
@@ -0,0 +1,15 @@
/* eslint-disable no-console */
// 请勿删除
if (import.meta.env.PROD) {
const copyright_common_style = 'font-size: 14px; margin-bottom: 2px; padding: 6px 8px; color: #fff;'
const copyright_main_style = `${copyright_common_style} background: #e24329;`
const copyright_sub_style = `${copyright_common_style} background: #707070;`
if ((navigator.language).toLowerCase() === 'zh-cn') {
console.info('%c由%cFantastic-admin%c驱动', copyright_sub_style, copyright_main_style, copyright_sub_style, '\nhttps://gitee.com/hooray/fantastic-admin')
}
else {
console.info('%cPowered by%cFantastic-admin', copyright_sub_style, copyright_main_style, '\nhttps://github.com/hooray/fantastic-admin')
}
}
export {}