diff --git a/apps/nuxt-app/nuxt.config.ts b/apps/nuxt-app/nuxt.config.ts index f191d38..9fcb705 100644 --- a/apps/nuxt-app/nuxt.config.ts +++ b/apps/nuxt-app/nuxt.config.ts @@ -8,6 +8,10 @@ export default defineNuxtConfig({ autoprefixer: {} } }, + // https://github.com/nuxt/nuxt/issues/20428 + experimental: { + inlineSSRStyles: false + }, modules: [ [ nuxtPlugin, diff --git a/packages/unplugin-tailwindcss-mangle/README.md b/packages/unplugin-tailwindcss-mangle/README.md index 1819e47..af9123d 100644 --- a/packages/unplugin-tailwindcss-mangle/README.md +++ b/packages/unplugin-tailwindcss-mangle/README.md @@ -16,6 +16,7 @@ It is recommended to read the documentation of [tailwindcss-patch](https://githu - [5. Register this plugin](#5-register-this-plugin) - [vite](#vite) - [webpack](#webpack) + - [Nuxt 3](#nuxt-3) - [Options](#options) - [Notice](#notice) - [Migration form v1 to v2](#migration-form-v1-to-v2) @@ -111,6 +112,29 @@ module.exports = defineConfig({ ``` +#### Nuxt 3 + +```ts +import nuxtPlugin from 'unplugin-tailwindcss-mangle/nuxt' +export default defineNuxtConfig({ + //... + // https://github.com/nuxt/nuxt/issues/20428 + // you must set this option to false to enable vite extract css + experimental: { + inlineSSRStyles: false + }, + modules: [ + [ + nuxtPlugin, + { + // options + } + ] + ] +}) + +``` + ## Options [types.ts]('./src/types.ts')