Replies: 2 comments 3 replies
-
You need to add Previously Remix handled this out of the box with their compiler, but now they're building on top of Vite so they can focus on Remix features and defer these matters to Vite. Your code should work correctly like this: import { LinksFunction } from "@remix-run/node";
-import styles from "./index.css";
+import styles from "./index.css?url";
export const links: LinksFunction = () => [{ rel: "stylesheet", href: styles }]; |
Beta Was this translation helpful? Give feedback.
2 replies
-
Importing this way exposes the styles defined to the entire application. How would we import if we want to keep a stylesheet scoped or sandboxed to a specific route or component? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For those who had error: [RollupError]: "default" is not exported by './index.css' imported by "app/root.tsx".
Don't do
Just do this:
Beta Was this translation helpful? Give feedback.
All reactions