transpilePackages

يمكن لـ Next.js تحويل وتجميع التبعيات تلقائيًا من الحزم المحلية (مثل monorepos) أو من التبعيات الخارجية (node_modules). هذا يحل محل حزمة next-transpile-modules.

next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  transpilePackages: ['package-name'],
}

module.exports = nextConfig

سجل الإصدارات

الإصدارالتغييرات
v13.0.0تمت إضافة transpilePackages.