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
- MDX: the docs say
@mdx-js/rollupis auto-injected, but the injection only fires when the package is already installed —initnever installs it, so the first build fails on unresolved.mdximports - Tailwind v4: when configured through
postcss.config.mjswith string-form plugins, the build fails under Vite withENOENT ... tailwindcss(from postcss-import). Tailwind v4 needs@tailwindcss/vitein 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.
Source: cloudflare/vinext