feat: add separate tailwindcss v3 plugin (#3135)
Makes it easier to keep using tailwindcss v3 with newer Fresh versions.
This commit is contained in:
@@ -26,11 +26,10 @@ that.
|
||||
|
||||
```diff dev.ts
|
||||
import { Builder } from "fresh/dev";
|
||||
import { app } from "./main.ts";
|
||||
+ import { tailwind } from "@fresh/plugin-tailwind";
|
||||
|
||||
const builder = new Builder();
|
||||
+ tailwind(builder, app);
|
||||
+ tailwind(builder);
|
||||
```
|
||||
|
||||
4. Add `@import "tailwindcss";` at the top of your main stylesheet.
|
||||
@@ -52,3 +51,16 @@ tailwind(builder, app, {
|
||||
base: null,
|
||||
});
|
||||
```
|
||||
|
||||
## Tailwindcss v3
|
||||
|
||||
If can't update to the current version of tailwindcss we have a dedicated
|
||||
`@fresh/plugin-tailwindcss-v3` plugin that uses tailwindcss v3. That way you can
|
||||
decided on your own when it's best to update to v4.
|
||||
|
||||
```ts dev.ts
|
||||
import { Builder } from "fresh/dev";
|
||||
import { tailwind } from "@fresh/plugin-tailwindcss-v3";
|
||||
|
||||
tailwind(builder, {});
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user