Skip to content

Commit

Permalink
document CLI --config upgrade guide
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Jan 31, 2025
1 parent 262cfd7 commit 6920b4a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/docs/upgrade-guide.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CodeExampleStack } from "@/components/code-example";

export const title = "Upgrade guide";
export const description = "Upgrading your Tailwind CSS projects from v3 to v4.";

Expand Down Expand Up @@ -74,6 +76,25 @@ npx tailwindcss -i input.css -o output.css
npx @tailwindcss/cli -i input.css -o output.css
```

#### CLI options

In v3, you could use the `--config` option to point to your configuration file.
In v4 there is no configuration file anymore. If you still require a
configuration file, make sure to include it in your CSS file and use the `@config` directive:

<CodeExampleStack>

```css
/* [!code filename:input.css] */
@config "./tailwind.config.js";
```

```shell
npx @tailwindcss/cli -i input.css -o output.css
```

</CodeExampleStack>

## Changes from v3

Here's a comprehensive list of all the breaking changes in Tailwind CSS v4.0.
Expand Down

0 comments on commit 6920b4a

Please sign in to comment.