use "?url" suffix in "tailwind.css" import (Remix) (#4945)

Importing `tailwind.css` is incorrect as it will treat that file as a CSS Module, throwing that it has no `default` export. 

Instead, the tutorial relies on the import returning a _URL_ to the stylesheet. Adding `?url` to the import specifier is the way to go.
This commit is contained in:
Artem Zakharchenko
2024-09-26 14:42:49 +02:00
committed by GitHub
parent 28f34ed3c3
commit 7dfdb029e7

View File

@@ -78,7 +78,7 @@ export default {
In your `app/root.tsx` file, import the `tailwind.css` file:
```js {1, 4}
import styles from "./tailwind.css"
import styles from "./tailwind.css?url"
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: styles },