Skip to content

Commit

Permalink
feat: use new unstable_tailwindcss flag
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeBoey committed Mar 16, 2023
1 parent 3682a44 commit 5730804
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ node_modules
/cypress/videos
/prisma/data.db
/prisma/data.db-journal

/app/styles/tailwind.css
10 changes: 5 additions & 5 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
ScrollRestoration,
} from "@remix-run/react";

import tailwindStylesheetUrl from "./styles/tailwind.css";
import { getUser } from "./session.server";
import { getUser } from "~/session.server";
import stylesheet from "~/tailwind.css";

export const links: LinksFunction = () => {
return [{ rel: "stylesheet", href: tailwindStylesheetUrl }];
};
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: stylesheet },
];

export async function loader({ request }: LoaderArgs) {
return json({
Expand Down
3 changes: 3 additions & 0 deletions app/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@
"private": true,
"sideEffects": false,
"scripts": {
"build": "run-s build:*",
"build:css": "npm run generate:css -- --minify",
"build:remix": "remix build",
"dev": "run-p dev:*",
"dev:css": "npm run generate:css -- --watch",
"dev:remix": "cross-env NODE_ENV=development binode --require ./mocks -- @remix-run/dev:remix dev",
"build": "remix build",
"dev": "cross-env NODE_ENV=development binode --require ./mocks -- @remix-run/dev:remix dev",
"format": "prettier --write .",
"generate:css": "tailwindcss -o ./app/styles/tailwind.css",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
"setup": "prisma generate && prisma migrate deploy && prisma db seed",
"start": "remix-serve build",
Expand Down
3 changes: 2 additions & 1 deletion remix.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
cacheDirectory: "./node_modules/.cache/remix",
future: {
v2_meta: true,
unstable_tailwind: true,
},
ignoredRouteFiles: ["**/.*", "**/*.css", "**/*.test.{js,jsx,ts,tsx}"],
ignoredRouteFiles: ["**/.*", "**/*.test.{js,jsx,ts,tsx}"],
};
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./app/**/*.{ts,tsx,jsx,js}"],
content: ["./app/**/*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
Expand Down

0 comments on commit 5730804

Please sign in to comment.