From e8ca2520d30bc852344328d7792465d53fe1b59e Mon Sep 17 00:00:00 2001 From: satnaing Date: Fri, 13 Dec 2024 14:18:25 +0700 Subject: [PATCH] fix: loading all tabler-icon chunks in dev mode 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', }, }, })