+ Add @tailwindcss/webpack as a loader in your webpack.config.js file, along with{" "}
+ css-loader and MiniCssExtractPlugin for extracting your CSS.
+
+ Installing Tailwind CSS as a webpack loader is the most seamless way to integrate it with webpack-based
+ projects. It replaces the need for PostCSS in your webpack build pipeline.
+
+
+
+
+
+ Are you stuck? Setting up Tailwind
+ with webpack can be a bit different across different build tools. Check our framework guides to see if we have
+ more specific instructions for your particular setup.
+
+
+ >
+ );
+}
diff --git a/src/app/(docs)/docs/installation/framework-guides/gatsby.tsx b/src/app/(docs)/docs/installation/framework-guides/gatsby.tsx
index e70551148..4bd9570e9 100644
--- a/src/app/(docs)/docs/installation/framework-guides/gatsby.tsx
+++ b/src/app/(docs)/docs/installation/framework-guides/gatsby.tsx
@@ -1,4 +1,4 @@
-import { astro, css, js, Page, shell, Step, Tile } from "./utils";
+import { css, js, Page, shell, Step, Tab, Tile } from "./utils";
import Logo from "@/docs/img/guides/gatsby.react.svg";
export let tile: Tile = {
@@ -12,12 +12,23 @@ export let page: Page = {
description: "Setting up Tailwind CSS in a Gatsby project.",
};
+export let tabs: Tab[] = [
+ {
+ slug: "webpack",
+ title: "Using webpack",
+ },
+ {
+ slug: "postcss",
+ title: "Using PostCSS",
+ },
+];
+
export let steps: Step[] = [
{
title: "Create your project",
body: (
- Start by creating a new Gatsby project if you don’t have one set up already. The most common approach is to use{" "}
+ Start by creating a new Gatsby project if you don't have one set up already. The most common approach is to use{" "}
Gatsby CLI.
- Create a gatsby-browser.js file at the root of your project if it doesn’t already exist, and import
+ Create a gatsby-browser.js file at the root of your project if it doesn't already exist, and import
your newly-created ./src/styles/global.css file.
),
@@ -138,7 +193,7 @@ export let steps: Step[] = [
},
{
title: "Start using Tailwind in your project",
- body:
Start using Tailwind’s utility classes to style your content.
,
+ body:
Start using Tailwind's utility classes to style your content.
,
code: {
name: "index.js",
lang: "js",
diff --git a/src/app/(docs)/docs/installation/framework-guides/nextjs.tsx b/src/app/(docs)/docs/installation/framework-guides/nextjs.tsx
index edd390bd1..b93898174 100644
--- a/src/app/(docs)/docs/installation/framework-guides/nextjs.tsx
+++ b/src/app/(docs)/docs/installation/framework-guides/nextjs.tsx
@@ -1,4 +1,4 @@
-import { css, js, shell, Page, Step, Tile } from "./utils";
+import { css, js, shell, Page, Step, Tab, Tile } from "./utils";
import Logo from "@/docs/img/guides/nextjs.react.svg";
import LogoDark from "@/docs/img/guides/nextjs-white.react.svg";
@@ -14,12 +14,23 @@ export let page: Page = {
description: "Setting up Tailwind CSS in a Next.js project.",
};
+export let tabs: Tab[] = [
+ {
+ slug: "webpack",
+ title: "Using webpack",
+ },
+ {
+ slug: "postcss",
+ title: "Using PostCSS",
+ },
+];
+
export let steps: Step[] = [
{
title: "Create your project",
body: (
- Start by creating a new Next.js project if you don’t have one set up already. The most common approach is to use{" "}
+ Start by creating a new Next.js project if you don't have one set up already. The most common approach is to use{" "}
Create Next App.