[6.12] Tailwind viewer broken for nuxt2 and bridge
Environment
nuxt: 2.18.1 @nuxtjs/tailwindcss: 6.12.1
Reproduction
https://stackblitz.com/edit/nuxt-starter-z3wjs5?file=nuxt.config.js
- npm run dev
- open stackblitz /_tailwind
Describe the bug
After upgrading the nuxt tailwindcss module, the tailwind viewer breaks.
Additional context
Logs
> nuxt dev
ℹ Using default Tailwind CSS file nuxt:tailwindcss 12:07:10
ℹ Module @nuxtjs/tailwindcss took 95.26ms to setup. 12:07:10
ℹ Tailwind Viewer: http://localhost:3000/_tailwind/ nuxt:tailwindcss 12:07:11
╭───────────────────────────────────────╮
│ │
│ Nuxt @ v2.18.1 │
│ │
│ ▸ Environment: development │
│ ▸ Rendering: server-side │
│ ▸ Target: server │
│ │
│ Listening: http://localhost:3000/ │
│ │
╰───────────────────────────────────────╯
ℹ Preparing project for development 12:07:11
ℹ Initial build may take a while 12:07:11
ℹ Discovered Components: .nuxt/components/readme.md 12:07:11
✔ Builder initialized 12:07:11
✔ Nuxt files generated 12:07:11
✔ Client
Compiled successfully in 2.86s
✔ Server
Compiled successfully in 2.37s
ℹ Waiting for file changes 12:07:14
ℹ Memory usage: 0 B (RSS: 0 B) 12:07:14
ℹ Listening on: http://localhost:3000/
I was trying to find what changes were doing to setting up the viewer between 6.11.4 and 6.12.1, and couldn't find anything... until I realised that we are adding the serverMiddleware in modules:done hook now. It's working on my PC, so I wonder if this is some race condition.
@danielroe thoughts on modules updating serverMiddleware in modules:done for Nuxt 2? (ignore this till after your holiday please)
Hi @nhh, a fix was just pushed - can you test nightly version of the module please? (after CI is done)