From cd22c511b27ffc55afe7438a872d4c5f305432da Mon Sep 17 00:00:00 2001 From: deyan-koba-zupit Date: Tue, 30 Apr 2024 13:15:48 +0200 Subject: [PATCH] fix: windows separators --- src/utils/assets.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/assets.ts b/src/utils/assets.ts index f96e5a5..f829eb4 100644 --- a/src/utils/assets.ts +++ b/src/utils/assets.ts @@ -22,7 +22,9 @@ export interface AssetsMap { export const ASSETS_EXTENSION = 'svg'; export const loadPaths = async (dir: string): Promise => { - const globPath = join(dir, `**/*.${ASSETS_EXTENSION}`); + // glob has issues with windows separators, so we need to replace them + const globPath = join(dir, `**/*.${ASSETS_EXTENSION}`).replace(/\\/g,'/'); + const files = await glob(globPath, {}); if (!files.length) {