ZhangXianQiang
2024-03-04 ce8e5c19f97cef0391828e08f5584c325abd3879
1
2
3
4
5
6
7
8
export const require = (imgPath) => {
  try {
    const handlePath = imgPath.replace('@', '..');
    return new URL(handlePath, import.meta.url).href;
  } catch(err) {
    console.warn(err);
  }
}