目录引言一、安装 tailwindCSS二、在 Remix 中启动 tailwindcss 的支持三、初始化 tailwindcss 配置文件四、配置 tailwindcss 配置问
从 v1.16.0 版本开始 Remix 的对 css 支持开始稳定。本文单独详细的介绍 remix css 方案之使用 tailwindcss 方法。
npm create remix <your_app_name>
cd <your_app_name>
npm install -D tailwindcss
module.exports = {
tailwind: true,
// ...
};
npx tailwindcss init --ts
import type { Config } from "tailwindcss";
export default {
content: ["./app*.{js,jsx,ts,tsx}"],
theme: {
extend: {},
},
plugins: [],
} satisfies Config;
@tailwind base;
@tailwind components;
@tailwind utilities;
import type { LinksFunction } from "@remix-run/node"; // or cloudflare/deno
// ...
import styles from "./tailwind.css";
export const links: LinksFunction = () => [
{ rel: "stylesheet", href: styles },
];
以上就是详解如何在Remix 中使用 tailwindcss的详细内容,更多关于Remix使用tailwindcss的资料请关注编程网其它相关文章!
--结束END--
本文标题: 详解如何在Remix中使用tailwindcss
本文链接: https://www.lsjlt.com/news/212712.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-01-12
2023-05-20
2023-05-20
2023-05-20
2023-05-20
2023-05-20
2023-05-20
2023-05-20
2023-05-20
2023-05-20
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0