From 2dfd3d4ce4f98b08b78aeb10f7ee509b23786c9d Mon Sep 17 00:00:00 2001 From: Bence Markus Date: Sun, 10 Dec 2023 16:21:59 +0100 Subject: [PATCH] build fix --- src/assets/icon/triangle.svg | 5 ++++- src/components/Icon/index.ts | 1 - src/components/Icon/ts/functions.ts | 23 ----------------------- 3 files changed, 4 insertions(+), 25 deletions(-) delete mode 100644 src/components/Icon/ts/functions.ts diff --git a/src/assets/icon/triangle.svg b/src/assets/icon/triangle.svg index 0d942816..39522837 100644 --- a/src/assets/icon/triangle.svg +++ b/src/assets/icon/triangle.svg @@ -1 +1,4 @@ -w + + + \ No newline at end of file diff --git a/src/components/Icon/index.ts b/src/components/Icon/index.ts index ff1e63af..4ae3affc 100644 --- a/src/components/Icon/index.ts +++ b/src/components/Icon/index.ts @@ -1,3 +1,2 @@ export { Icon, IconSize, iconMap } from './ts/constants'; -export { createSvgMap } from './ts/functions'; export { default as BoIcon } from './vue/BoIcon.vue'; diff --git a/src/components/Icon/ts/functions.ts b/src/components/Icon/ts/functions.ts deleted file mode 100644 index d978f91a..00000000 --- a/src/components/Icon/ts/functions.ts +++ /dev/null @@ -1,23 +0,0 @@ -export const createSvgMap = (): Map => { - const getSvgNameFromPath = (path: string): string => { - const pathSplit = path.split('/'); - const fileName = pathSplit[pathSplit.length - 1] || ''; - const svgName = fileName.replace('.svg', ''); - - return svgName; - }; - - const modules = import.meta.glob('@/assets/icon/**/*.svg', { - import: 'default', - eager: true, - }); - - const svgMap: Map = new Map(); - - Object.keys(modules).forEach((path) => { - const svgName = getSvgNameFromPath(path); - svgMap.set(svgName, modules[path]); - }); - - return svgMap; -};