#Navigation using Link component not working after building
13 messages · Page 1 of 1 (latest)
I am not doing anything fancy, just wrapping the Link component to add some conditional tailwind styles in a component, all I add are css classes.
Replacing <Link> with <a> for now
export const ExtLink = component$<Props>(({ href, cssClass, target, type = 'simple', title }) => {
const linkType = {
info: 'link link-info link-hover',
warning: 'link link-warning link-hover',
error: 'link link-error link-hover',
success: 'link link-success link-hover',
primary: 'link link-primary link-hover',
secondary: 'link link-secondary link-hover',
accent: 'link link-accent link-hover',
neutral: 'link link-neutral link-hover',
simple: 'link link-hover',
element: 'w-full h-full flex items-center justify-center link-hover',
};
return (
<Link href={href} target={target} title={title} class={`${linkType[type]} ${cssClass}`}>
<Slot />
</Link>
);
});
This seems to be an error coming from code which is part of vite 5. I will try to investigate further.
somehow connected to compiled-i18n and vite. https://github.com/wmertens/compiled-i18n/issues/1#issuecomment-1890121384
I added a patch in the mentioned issue that resolves it at the root (vite), from what I can tell.
@last marten this is still a thing right? I was wondering if you fixed it woithout patching it. Should we as the vite guys to take a look?
This "magically" resolved itself. I am not sure what the actual issue was .. Honestly, I changed a lot and fixed a lot of issues in my code since I had this problem that it is safe to assume that it went away a) because I fixed stupid bugs, b) compiled-18n got smarter, c) some newer vite 5 version fixed it, d) i had invalid/problematic keys in my translations
Oh my, I updated vite and qwik and deleted all build files and it’s gone as well. Thanks for the qwik answer 🙌
Yeah, sometimes time itself solves the issue, lol
Time solves all the problems 😄
If someone dies all the problems are gone or delegated to someone else 😄