From 6bd2aa8f6511b7e0d0fa88afea69e34a9a8968dc Mon Sep 17 00:00:00 2001 From: Khavin Shankar Date: Sat, 9 Nov 2024 00:02:04 +0530 Subject: [PATCH] Include icons used in enabled apps while treeshaking the icons (#9068) --- plugins/treeShakeCareIcons.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/treeShakeCareIcons.ts b/plugins/treeShakeCareIcons.ts index 131889c0f44..3ce077f5d5f 100644 --- a/plugins/treeShakeCareIcons.ts +++ b/plugins/treeShakeCareIcons.ts @@ -1,7 +1,7 @@ -import { Plugin } from "vite"; import * as fs from "fs"; -import * as path from "path"; import { globSync } from "glob"; +import * as path from "path"; +import { Plugin } from "vite"; /** * Interface defining options for the treeShakeUniconPathsPlugin. @@ -48,7 +48,7 @@ export function treeShakeCareIcons( } // Finds all used icon names within the project's source files (`.tsx` or `.res` extensions). function getAllUsedIconNames() { - const files = globSync(path.resolve(rootDir, "src/**/*.{tsx,res}")); + const files = globSync(path.resolve(rootDir, "{apps,src}/**/*.{tsx,res}")); const usedIconsArray: string[] = []; files.forEach((file) => {