Skip to content

Commit 749734e

Browse files
chore: docs guides remix - upgrade from classic to vite (#1351)
1 parent 4646ad1 commit 749734e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

apps/web/content/docs/guides/remix.mdx

+9-6
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ npx create-remix@latest
3636
1. Install `tailwindcss` and its peer dependencies:
3737

3838
```bash
39-
npm i -D tailwindcss
39+
npm install -D tailwindcss postcss autoprefixer
4040
```
4141

42-
2. Generate `tailwind.config.ts` file:
42+
2. Generate `tailwind.config.ts` and `postcss.config.js` files:
4343

4444
```bash
45-
npx tailwindcss init --ts
45+
npx tailwindcss init --ts -p
4646
```
4747

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

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

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

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

121122
import { ThemeModeScript } from "flowbite-react";
122123

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

139140
```tsx
141+
// app/routes/_index.tsx
142+
140143
import { Button } from "flowbite-react";
141144

142145
export default function Index() {

0 commit comments

Comments
 (0)