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
cn(" text-white") causes nextjs page crash in browser giving out of memory error. cn("text-white") fixes the issue. that space took me 6 hours to find out about. Worked fine before new release. cn is also a function that uses clsx and tailwind-merge to combine classnames.
To Reproduce
create a nextjs app
create the cn function as below:
import { type ClassValue, clsx } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
use cn(" text-white") classname as an example.
the page crashes in browser while it is on a not much powerful server. I still don't understand why it is related to the server cpu causing client browser to crash.
Expected behavior
No crash in browser.
Environment
nextjs v14.2.5
clsx v2.0.0
The text was updated successfully, but these errors were encountered:
Describe the bug
cn(" text-white") causes nextjs page crash in browser giving out of memory error. cn("text-white") fixes the issue. that space took me 6 hours to find out about. Worked fine before new release. cn is also a function that uses clsx and tailwind-merge to combine classnames.
To Reproduce
Expected behavior
No crash in browser.
Environment
nextjs v14.2.5
clsx v2.0.0
The text was updated successfully, but these errors were encountered: