From 0d101673d217dfb728ed2c5e79df2bfdbbaa8e13 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Tue, 4 Jul 2023 12:52:26 +0530 Subject: [PATCH] chore: update vitest config to support loading icons --- packages/hoppscotch-common/vitest.config.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/hoppscotch-common/vitest.config.ts b/packages/hoppscotch-common/vitest.config.ts index 46c407882..8d89bcc8b 100644 --- a/packages/hoppscotch-common/vitest.config.ts +++ b/packages/hoppscotch-common/vitest.config.ts @@ -1,5 +1,7 @@ import { defineConfig } from "vitest/config" import * as path from "path" +import Icons from "unplugin-icons/vite" +import { FileSystemIconLoader } from "unplugin-icons/loaders" export default defineConfig({ test: { @@ -9,6 +11,22 @@ export default defineConfig({ resolve: { alias: { "~": path.resolve(__dirname, "../hoppscotch-common/src"), + "@composables": path.resolve( + __dirname, + "../hoppscotch-common/src/composables" + ), }, }, + plugins: [ + Icons({ + compiler: "vue3", + customCollections: { + hopp: FileSystemIconLoader("../hoppscotch-common/assets/icons"), + auth: FileSystemIconLoader("../hoppscotch-common/assets/icons/auth"), + brands: FileSystemIconLoader( + "../hoppscotch-common/assets/icons/brands" + ), + }, + }) as any, + ], })