src/utils/require.ts
@@ -1,8 +1,8 @@ /* eslint-disable no-console */ const require = (imgPath: string) => { try { const handlePath = imgPath.replace('@', '..') return new URL(handlePath, import.meta.url).href const handlePath = imgPath.replace('@/assets/image/', '') return new URL(`../assets/image/${handlePath}`, import.meta.url).href } catch (error) { console.log(error) }