From cdedc10e5656fcad53cccfe628e03d8281255dd6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 23 Dec 2023 20:15:45 -0500 Subject: [PATCH] fic: use vite css side effects --- app/root.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/root.tsx b/app/root.tsx index 614f807..d2e31b7 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -9,10 +9,11 @@ import { } from "@remix-run/react"; import Header from "@/components/LayoutHeader"; // Adjust the import path as needed import Footer from "@/components/LayoutFooter"; // Adjust the import path as needed -import globalStyles from "../styles/global.scss?url"; +import "../styles/global.scss"; +import { cssBundleHref } from "@remix-run/css-bundle"; // Adjust the import path as needed export const links: LinksFunction = () => [ - { rel: "stylesheet", href: globalStyles }, + ...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []), // Add your Google font links here // Example: { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400&display=swap" }, // Example: { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Jaldi:wght@400&display=swap" },