From d38461ea1683208891107d98084e486c1e79edf2 Mon Sep 17 00:00:00 2001 From: Oksamies Date: Mon, 22 Dec 2025 19:14:32 +0200 Subject: [PATCH] Fix issue with root.tsx import sorting making styles break If the css file is not imported as the first thing, the css layers will bork --- .prettierrc | 7 ++++++- apps/cyberstorm-remix/app/root.tsx | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.prettierrc b/.prettierrc index de1b42ee8..a438dc8f5 100644 --- a/.prettierrc +++ b/.prettierrc @@ -17,7 +17,12 @@ "useTabs": false, "vueIndentScriptAndStyle": false, "plugins": ["@trivago/prettier-plugin-sort-imports"], - "importOrder": ["", "^@thunderstore/(.*)$", "^[./]"], + "importOrder": [ + "^\\./styles/index\\.css$", + "", + "^@thunderstore/(.*)$", + "^[./]" + ], "importOrderSeparation": true, "importOrderSortSpecifiers": true } diff --git a/apps/cyberstorm-remix/app/root.tsx b/apps/cyberstorm-remix/app/root.tsx index 378c4275d..4d4de375e 100644 --- a/apps/cyberstorm-remix/app/root.tsx +++ b/apps/cyberstorm-remix/app/root.tsx @@ -1,3 +1,5 @@ +import "./styles/index.css"; + // import { LinksFunction } from "@remix-run/react/dist/routeModules"; import { Provider as RadixTooltip } from "@radix-ui/react-tooltip"; import { withSentry } from "@sentry/remix"; @@ -48,7 +50,6 @@ import { import type { Route } from "./+types/root"; import { Footer } from "./commonComponents/Footer/Footer"; import { NavigationWrapper } from "./commonComponents/Navigation/NavigationWrapper"; -import "./styles/index.css"; // REMIX TODO: https://remix.run/docs/en/main/route/links // export const links: LinksFunction = () => [{ rel: "stylesheet", href: styles }];