#CSS Bundle Usage

1 messages · Page 1 of 1 (latest)

rotund prairie
#

Open to suggestions & information 😄

rotund prairie
#

^ BuMp ^

rotund prairie
#

Still messing with this cssBundleHref thing and I am missing something. Here is what I have...

import type { LinksFunction } from "@remix-run/cloudflare";
import appStyles from "~/styles/app.css";
import { cssBundleHref } from "@remix-run/css-bundle";
//Other imports from @remix-run/react;

export const links: LinksFunction = () => [
  ...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
  { rel: "stylesheet", href: appStyles },
];

And my css is just a css file. When I run npm run dev it is working, but when I have it built on cloudflare it doesn't work. I suppose I wonder why even have the import { cssBundleHref } from "@remix-run/css-bundle"; when the export const links: LinksFunction = () => [ is what I would have anyway? Also, why does it not work on Cloudflare?