Skip to content

Commit b735483

Browse files
committed
chore: add nuxt 3 usage
1 parent eef18fa commit b735483

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

apps/nuxt-app/nuxt.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ export default defineNuxtConfig({
88
autoprefixer: {}
99
}
1010
},
11+
// https://github.com/nuxt/nuxt/issues/20428
12+
experimental: {
13+
inlineSSRStyles: false
14+
},
1115
modules: [
1216
[
1317
nuxtPlugin,

packages/unplugin-tailwindcss-mangle/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ It is recommended to read the documentation of [tailwindcss-patch](https://githu
1616
- [5. Register this plugin](#5-register-this-plugin)
1717
- [vite](#vite)
1818
- [webpack](#webpack)
19+
- [Nuxt 3](#nuxt-3)
1920
- [Options](#options)
2021
- [Notice](#notice)
2122
- [Migration form v1 to v2](#migration-form-v1-to-v2)
@@ -111,6 +112,29 @@ module.exports = defineConfig({
111112

112113
```
113114

115+
#### Nuxt 3
116+
117+
```ts
118+
import nuxtPlugin from 'unplugin-tailwindcss-mangle/nuxt'
119+
export default defineNuxtConfig({
120+
//...
121+
// https://github.com/nuxt/nuxt/issues/20428
122+
// you must set this option to false to enable vite extract css
123+
experimental: {
124+
inlineSSRStyles: false
125+
},
126+
modules: [
127+
[
128+
nuxtPlugin,
129+
{
130+
// options
131+
}
132+
]
133+
]
134+
})
135+
136+
```
137+
114138
## Options
115139

116140
[types.ts]('./src/types.ts')

0 commit comments

Comments
 (0)