ZhangXianQiang
2024-03-04 2b7b4e2ea52a17eda4eca7ada4a139ad20785631
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);
  }
}