Skip to content

Commit b5ab4dc

Browse files
authored
docs:support Next.js 13 (#361)
1 parent b149d80 commit b5ab4dc

1 file changed

Lines changed: 22 additions & 2 deletions

File tree

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<img src="https://user-images.githubusercontent.com/64439681/181564610-a0fd8fef-b552-4cc5-b115-8652dc142065.svg">
44

5-
**daisyUI components built with React, Typescript and TailwindCSS**
5+
**daisyUI components built with React, Typescript and TailwindCSS**
66

77
[ [See all components](https://react.daisyui.com/) ]
88

@@ -36,11 +36,31 @@ To prevent TailwindCSS from purging your styles, add the following line to your
3636

3737
```js
3838
module.exports = {
39-
content: ['node_modules/daisyui/dist/**/*.js', 'node_modules/react-daisyui/dist/**/*.js'],
39+
content: [
40+
'node_modules/daisyui/dist/**/*.js',
41+
'node_modules/react-daisyui/dist/**/*.js',
42+
],
4043
plugins: [require('daisyui')],
4144
}
4245
```
4346

47+
<details>
48+
<summary>For Next.js 13:</summary>
49+
50+
Modify `transpilePackages` in your `next.config.js` file:
51+
52+
```js
53+
const nextConfig = {
54+
// ... your content here
55+
transpilePackages: ['react-daisyui'],
56+
reactStrictMode: true,
57+
}
58+
59+
module.exports = nextConfig
60+
```
61+
62+
</details>
63+
4464
<details>
4565
<summary>For Next.js 12:</summary>
4666
Install next-transpile modules:

0 commit comments

Comments
 (0)