From ca66e8ede300e793b4e4bafb5c33648a8d324d14 Mon Sep 17 00:00:00 2001 From: Sat Naing Date: Fri, 13 Dec 2024 17:07:31 +0700 Subject: [PATCH] fix: loading all tabler-icon chunks in dev mode (#59) Unnecessary tabler icon chunks are loaded in dev mode which causes the performance issue during development. This issue is solved by replacing the import alias for '@tabler/icons-react' in vite.config.ts Resolves #54 --- vite.config.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index bcb01fe8..a3c5944b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,6 +9,10 @@ export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, './src'), + + // fix loading all icon chunks in dev mode + // https://github.com/tabler/tabler-icons/issues/1233 + '@tabler/icons-react': '@tabler/icons-react/dist/esm/icons/index.mjs', }, }, })