You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Vike with React (vike-react) and the @tabler/icons-react package (^3.31.0), the development mode breaks after importing any icon into a component. Vite starts loading all the icon chunks, which causes a significant delay (about 10 seconds on my machine). The issue does not occur during the build process or when running the app in preview mode.
Reproduction
Install the following packages:
"vike": "^0.4.225"
"vike-cloudflare": "^0.1.7"
"vike-react": "^0.6.1"
"vite": "^6.2.2"
"@tabler/icons-react": "^3.31.0"
Import any icon from @tabler/icons-react in a component, e.g.:
import{Home}from'@tabler/icons-react';
Temporary Workaround
As a temporary solution, adding the following configuration to vite.config.ts resolves the issue:
`import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
// Add this alias to solve the issue temporarily
'@tabler/icons-react': '@tabler/icons-react/dist/esm/icons/index.mjs',
},
},
});
`
Checklist
I have searched if someone has submitted a similar issue before and there weren't any. (Please make sure to also search closed issues, as this issue might already have been resolved.)
I have searched existing icons to make sure it does not already exist and I didn't find any.
I am not requesting a brand logo and the art is not protected by copyright.
I have provided appropriate use cases for the icon(s) requested.
The text was updated successfully, but these errors were encountered:
I believe this is a duplicate of #1233. Some other workarounds include importing the icons directly (see here) or pinning the package version to 3.17.0 or earlier (if you don't need any of the more recent icons).
Icon name
all
Use cases
all
Design ideas
Issue: Vike + @tabler/icons-react Breaks Dev Mode
Description
When using Vike with React (
vike-react
) and the@tabler/icons-react
package (^3.31.0
), the development mode breaks after importing any icon into a component. Vite starts loading all the icon chunks, which causes a significant delay (about 10 seconds on my machine). The issue does not occur during the build process or when running the app in preview mode.Reproduction
"vike": "^0.4.225"
"vike-cloudflare": "^0.1.7"
"vike-react": "^0.6.1"
"vite": "^6.2.2"
"@tabler/icons-react": "^3.31.0"
@tabler/icons-react
in a component, e.g.:Temporary Workaround
As a temporary solution, adding the following configuration to vite.config.ts resolves the issue:
`import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
// Add this alias to solve the issue temporarily
'@tabler/icons-react': '@tabler/icons-react/dist/esm/icons/index.mjs',
},
},
});
`
Checklist
The text was updated successfully, but these errors were encountered: