#3240·vinext

init: MDX + Tailwind v4 apps fail on first build (missing @mdx-js/rollup install, postcss string-form Tailwind unresolvable)

Author: JamesbbBrizCreated Sep 11, 2026Updated Sep 11, 2026

Context

npx vinext init on an existing Next.js app that uses MDX pages and/or Tailwind v4 — the standard shape of a Payload 3 or content-heavy app being migrated.

Observed — two failures before the first successful build

  1. MDX: the docs say @mdx-js/rollup is auto-injected, but the injection only fires when the package is already installed — init never installs it, so the first build fails on unresolved .mdx imports
  2. Tailwind v4: when configured through postcss.config.mjs with string-form plugins, the build fails under Vite with ENOENT ... tailwindcss (from postcss-import). Tailwind v4 needs @tailwindcss/vite in the vite config instead; the check's "partial support" flag hints at this but init does not act on it

Expected

init should detect the frameworks in package.json (@mdx-js/*, tailwindcss) and onboard them: install the missing vite-side packages and generate configs that wire them. Related: the next.config webpack-ignored warning should say explicitly that it is safe to ignore (Vite resolves TS/TSX natively), since every Payload-style extensionAlias config trips it today.

Fixed by #3239.