refactor: 修改网站图标引用方式,解决打包后没有图标文件的问题

This commit is contained in:
2024-08-31 19:17:47 +08:00
parent 18f3b97ab8
commit afcf5d56b4
3 changed files with 36 additions and 33 deletions

View File

@@ -4,17 +4,6 @@ import {
description as appDesc,
} from '@package-json';
/** 当前模块 URL */
const META_URL = import.meta.url;
/**
* @description 获取资源文件 URL
* @param {string} path 文件相对于 assets 目录的路径
*/
export function getAssetsUrl(path = '') {
return new URL(`../${path}`, META_URL).href;
}
/**
* @description 更新页面标题
* @param {string} title