I'm getting:
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components.
in this example:
import { cn } from "@/lib/utils";
// Exported for drop area, MenuButton
export const ACTION_BUTTON_STYLE = ///// <-- flagged with error
"flex rounded-full py-2 px-3 items-center justify-center";
export const ACTION_BUTTON_PRIMARY_STYLE = cn(
/* normal.. */ "bg-zinc-900 text-white",
/* hover... */ "hover:bg-zinc-700",
/* active.. */ "active:bg-zinc-500",
/* disabled */ "disabled:bg-zinc-100 disabled:text-zinc-400",
);
where @/lib/utils.ts is:
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
Why am I getting the report? is this not a false positive?
I'm getting:
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components.in this example:
where
@/lib/utils.tsis:Why am I getting the report? is this not a false positive?