Skip to content

Commit

Permalink
chore: docs guides remix - upgrade from classic to vite (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
SutuSebastian authored Apr 5, 2024
1 parent 4646ad1 commit 749734e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions apps/web/content/docs/guides/remix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ npx create-remix@latest
1. Install `tailwindcss` and its peer dependencies:

```bash
npm i -D tailwindcss
npm install -D tailwindcss postcss autoprefixer
```

2. Generate `tailwind.config.ts` file:
2. Generate `tailwind.config.ts` and `postcss.config.js` files:

```bash
npx tailwindcss init --ts
npx tailwindcss init --ts -p
```

3. Add the paths to all of your template files in your `tailwind.config.ts` file:
Expand All @@ -69,8 +69,9 @@ export default {

5. Import the newly-created `./app/tailwind.css` file in your `./app/root.tsx` file:

```tsx {1,5}
import stylesheet from "~/tailwind.css";
```tsx {1,2,4-7}
import { LinksFunction } from "@remix-run/node";
import stylesheet from "~/tailwind.css?url";

export const links: LinksFunction = () => [
// ...
Expand Down Expand Up @@ -120,7 +121,7 @@ In server side rendered applications, such as Remix, to avoid page flicker (if `

import { ThemeModeScript } from "flowbite-react";

export default function App() {
export default function Layout() {
return (
<html lang="en">
<head>
Expand All @@ -137,6 +138,8 @@ export default function App() {
Now that you have successfully installed Flowbite React you can start using the components from the library.

```tsx
// app/routes/_index.tsx

import { Button } from "flowbite-react";

export default function Index() {
Expand Down

0 comments on commit 749734e

Please sign in to comment.