webcontainer-core icon indicating copy to clipboard operation
webcontainer-core copied to clipboard

vite.plugins in nuxt.config.js preventing boot

Open envygeeks opened this issue 8 months ago • 1 comments

Describe the bug

When somebody adds:

{
  vite: {
    plugins: [tailwindcss()]
  }
}

to their nuxt.config.ts Nitro refuses to boot on StackBlitz, however, if you download it'll readily run

Link to the blitz that caused the error

https://stackblitz.com/edit/nuxt-starter-mdqexezm

Steps to reproduce

  1. Go to Stack
  2. pnpm dev

Expected behavior

It to boot up

Parity with Local

Screenshots

Image

Platform

Browser name  = Chrome
Full version  = 135.0.0.0
Major version = 135
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 104427146,
  "usedJSHeapSize": 100193382,
  "jsHeapSizeLimit": 4294705152
}
Hash = 33edf5bb

Additional context

No response

envygeeks avatar Apr 08 '25 09:04 envygeeks

Hey @envygeeks 👋 ! The problem is that Tailwind relies on native addons, which don't work in the browser. They're looking into making it work in WebContainers by using WebAssembly. The only thing you can do right now is downgrade to Tailwind version 3 until they add WebAssembly support.

SamVerschueren avatar Apr 10 '25 09:04 SamVerschueren