enti
Turning off dark mode in Nuxt 3.16 with Nuxt 4 compatibility mode + Nuxt ui 3
I'm trying to force the light mode to Nuxt UI 3 in a Nuxt 4 compatible project (3.16).
I put this in my nuxt.config.ts:
But it doesn't work. All my Nuxt ui 3 elements stay in dark mode (system choice).
How cn I force the light mode from a Nuxt 4 compatible set up?
13 replies
Installing tailwindcss on Nuxt4
Context : fresh Nuxt 3.16 install with Nuxt4 compatibility
I installed tailwindcss with
npx nuxi module add tailwindcss
This is my nuxt.config.js:
I also installed postcss with pnpm install -D @tailwindcss/postcss
and this postcss.config.js file in the project root directory:
I still get this error when running:
[nuxi] ERROR Cannot start nuxt: It looks like you're trying to use tailwindcss directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install @tailwindcss/postcss and update your PostCSS configuration.
I'm going crazy here...31 replies
Nuxt4 and global css import
Context : fresh Nuxt 3.16 install with Nuxt 4 compatibility
When I add a global css import in my nuxt.config.ts file :
I end up with an error 500:
Cannot find module '~/assets/css/main.css' imported from 'virtual:nuxt:C:\Code\project\.nuxt\css.mjs'
Is there a new strategy for global CSS imports with Nuxt4? I didn't find any info about it15 replies