Skip to content

feat(init): onboard MDX and Tailwind v4 apps on first build - #3239

Open
JamesbbBriz wants to merge 2 commits into
cloudflare:mainfrom
JamesbbBriz:fix/init-framework-onboarding
Open

feat(init): onboard MDX and Tailwind v4 apps on first build#3239
JamesbbBriz wants to merge 2 commits into
cloudflare:mainfrom
JamesbbBriz:fix/init-framework-onboarding

Conversation

@JamesbbBriz

@JamesbbBriz JamesbbBriz commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Migrating a Next.js app that uses MDX pages and Tailwind v4 currently fails twice before the first successful build:

  • @mdx-js/rollup is required for the documented MDX auto-injection but was never installed by init
  • Tailwind v4 configured through postcss string plugins cannot resolve under Vite (ENOENT ... tailwindcss from postcss-import); it needs @tailwindcss/vite in the config

detectProject now reports hasTailwind (tailwindcss dependency); init installs @mdx-js/rollup / @tailwindcss/vite for detected frameworks and generates vite configs that wire tailwindcss() for both platforms. The next.config webpack-ignore warning now explains that Vite resolves TS/TSX natively, since every Payload-style extensionAlias config trips it today. Output for projects without Tailwind stays byte-identical.

Fixes #3240

Migrating a Next.js app that uses MDX pages and Tailwind v4 currently
fails twice before the first successful build:

- @mdx-js/rollup is required for the documented MDX auto-injection but
  was never installed by init
- Tailwind v4 configured through postcss.config string plugins cannot
  resolve under Vite; it needs @tailwindcss/vite in the config

detectProject now reports hasTailwind (tailwindcss dependency); init
installs @mdx-js/rollup / @tailwindcss/vite for detected frameworks and
generates vite configs that wire tailwindcss() for both platforms. The
next.config webpack-ignore warning now explains that Vite resolves
TS/TSX natively, since every Payload-style extensionAlias config trips
it today.

Output for projects without Tailwind stays byte-identical.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@3239
npm i https://pkg.pr.new/create-vinext-app@3239
npm i https://pkg.pr.new/@vinext/types@3239
npm i https://pkg.pr.new/vinext@3239

commit: 1337bb7

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 1337bb7 against base 13e7d9c using alternating same-runner rounds. Next.js was unchanged and skipped.

1 improved · 0 regressed · 5 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.4 KB 142.4 KB ⚫ -0.0%
Client entry size (gzip) vinext 129.7 KB 129.7 KB ⚫ -0.0%
Dev server cold start vinext 3.34 s 3.28 s 🟢 -1.6%
Production build time vinext 3.48 s 3.48 s ⚫ -0.1%
RSC entry closure size (gzip) vinext 125.4 KB 125.5 KB ⚫ +0.0%
Server bundle size (gzip) vinext 216.1 KB 216.1 KB ⚫ +0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

The first pass rewrapped a dozen untouched call sites onto multiple
lines. main is format-clean with the single-line forms, so the rewraps
were pure review noise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant