Skip to content

Commit

Permalink
fix: loading all tabler-icon chunks in dev mode (#59)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
satnaing authored Dec 13, 2024
1 parent 8d3c83b commit ca66e8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
},
})

0 comments on commit ca66e8e

Please sign in to comment.