Conversation
📝 WalkthroughWalkthroughThis PR migrates the build system from Next.js with integrated plugins to a Vite-based setup using vinext, removes Sentry, next-intl, and MDX integrations, adds React Server Components and Cloudflare Workers support, and converts the project to ESM modules. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
package.json (2)
85-85: Consider movingvinextto devDependencies.
vinextis a build tool similar to Vite and should typically be a development dependency rather than a production dependency, unless it's required at runtime for the Cloudflare Workers deployment.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` at line 85, The package.json currently lists "vinext" under dependencies but it is a build tool and should be moved to devDependencies; update package.json by removing "vinext" from the dependencies object and adding the same version entry under devDependencies, then verify any npm/yarn scripts (e.g., build/start scripts that reference vinext) still work in CI and local development (ensure CI installs devDependencies or add a separate build step) and confirm it is not required at runtime in your Cloudflare Workers code before removing from dependencies.
37-41: Consider removing unused MDX dependencies.
@mdx-js/loader,@mdx-js/react, and@next/mdxremain in dependencies, but the MDX integration was removed fromnext.config.ts. If MDX is no longer used with VineXT, these dependencies can be removed to reduce bundle size.#!/bin/bash # Description: Check if MDX is still being used in the codebase echo "=== MDX file usage ===" fd -e mdx --exclude node_modules | head -20 echo -e "\n=== MDX imports in code ===" rg -l "@mdx-js|\.mdx" --type ts --type tsx -g '!node_modules' | head -10🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 37 - 41, package.json still lists MDX packages ("@mdx-js/loader", "@mdx-js/react", "@next/mdx") though MDX support was removed from next.config.ts; search the repo for any remaining ".mdx" files or imports of "@mdx-js" or ".mdx" and if none exist remove those three dependencies from package.json, run your package manager to update lockfile (npm/yarn/pnpm install), and verify builds/tests pass; additionally check for any MDX-related config or loader code (imports referencing `@mdx-js/`* or next-mdx) and delete those remnants if present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@next.config.ts`:
- Line 49: Package.json contains unused dependencies `next-intl` and
`@sentry/nextjs`; remove them from dependencies to shrink the bundle unless you
intend to add i18n or Sentry integration. If you plan to support localization,
instead of keeping the package unused, integrate `next-intl` by calling its
helpers (e.g., useTranslations() in components and getTranslations() in server
code) and add the proper config, otherwise delete `next-intl` and
`@sentry/nextjs` entries from package.json and run a fresh install to update
lockfile; note that `next.config.ts` does not need plugin wrappers for this
change.
---
Nitpick comments:
In `@package.json`:
- Line 85: The package.json currently lists "vinext" under dependencies but it
is a build tool and should be moved to devDependencies; update package.json by
removing "vinext" from the dependencies object and adding the same version entry
under devDependencies, then verify any npm/yarn scripts (e.g., build/start
scripts that reference vinext) still work in CI and local development (ensure CI
installs devDependencies or add a separate build step) and confirm it is not
required at runtime in your Cloudflare Workers code before removing from
dependencies.
- Around line 37-41: package.json still lists MDX packages ("@mdx-js/loader",
"@mdx-js/react", "@next/mdx") though MDX support was removed from
next.config.ts; search the repo for any remaining ".mdx" files or imports of
"@mdx-js" or ".mdx" and if none exist remove those three dependencies from
package.json, run your package manager to update lockfile (npm/yarn/pnpm
install), and verify builds/tests pass; additionally check for any MDX-related
config or loader code (imports referencing `@mdx-js/`* or next-mdx) and delete
those remnants if present.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
next.config.tspackage.jsonvite.config.tsvitest.config.tswrangler.jsonc
| }, | ||
| }, | ||
| }); | ||
| export default nextConfig; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check next-intl usage patterns
echo "=== next-intl usage in codebase ==="
rg -n "useTranslations|getTranslations|NextIntlClientProvider" --type ts --type tsx -g '!node_modules' 2>/dev/null || echo "No matches found"
# Check i18n configuration files
echo -e "\n=== i18n configuration files ==="
fd -e json -e ts "i18n|messages|locale" --exclude node_modules 2>/dev/null || echo "No files found"
# Check package.json for dependencies
echo -e "\n=== Checking package.json for next-intl and sentry ==="
grep -E "next-intl|@sentry/nextjs" package.json 2>/dev/null || echo "Dependencies not found"
# Check next.config.ts content
echo -e "\n=== next.config.ts content ==="
cat -n next.config.tsRepository: f/prompts.chat
Length of output: 1744
Remove unused dependencies from package.json.
next-intl and @sentry/nextjs are present in dependencies but not used anywhere in the codebase. The simplified next.config.ts is correct—no plugin wrappers are needed. Remove these unused packages to reduce bundle size and avoid maintaining unnecessary dependencies. Note that the coding guidelines require next-intl for all user-facing strings; if i18n support is not needed, this is acceptable, but if it is planned, the dependency should be properly integrated with useTranslations() and getTranslations().
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@next.config.ts` at line 49, Package.json contains unused dependencies
`next-intl` and `@sentry/nextjs`; remove them from dependencies to shrink the
bundle unless you intend to add i18n or Sentry integration. If you plan to
support localization, instead of keeping the package unused, integrate
`next-intl` by calling its helpers (e.g., useTranslations() in components and
getTranslations() in server code) and add the proper config, otherwise delete
`next-intl` and `@sentry/nextjs` entries from package.json and run a fresh
install to update lockfile; note that `next.config.ts` does not need plugin
wrappers for this change.
Summary
vite.config.tswith vinext,@vitejs/plugin-rsc, and@cloudflare/vite-pluginconfigured for App Router RSCnext.config.ts: remove Sentry, MDX, and next-intl plugin wrappers; removeoutput: standalone,reactCompiler, and webpack configpackage.jsonscripts fromnexttovinextfor dev/build/start, addtype: modulefor ESMwrangler.jsoncwithnodejs_compatflag for Cloudflare Workersvitest.config.ts__dirnamefor ESM compatibility@testing-library/dompeer dependencyTest plan
vinext devstarts successfully on localhost:3000vinext buildreaches app-level font shim issue (Noto_Sans_Arabicnot exported by VineXT font shim) -- this is outside core migration scope and will be addressed in a separate app-code compatibility unitSummary by CodeRabbit