Next.js يضيف محسّن حزم بالذكاء الاصطناعي: قِس قبل تغيير الاستيراد
يساعد إعلان 28 أكتوبر على تتبّع JavaScript غير الضروري لدى العميل. ابدأ بتدقيق وقارن النتائج.

ما الذي تغيّر
أعلن Next.js عن المهارة next-bundle-optimizer. تستخدم مخطط وحدات Turbopack لتحليل الحزم، لذا يتطلب هذا المسار Turbopack وإصدارًا متوافقًا من Next.js 16.4. تعرض المهارة النتائج افتراضيًا؛ تطبيق الإصلاحات إجراء منفصل.
لماذا يهم
قد لا يؤجّل الاستيراد الكسول وحدة ثقيلة إذا وصل إليها استيراد مباشر آخر. استخدم الأداة للتحقيق في الاستيراد دون ضمان مكاسب. يحتاج مشروع webpack القائم إلى قرار توافق قبل اعتماد هذا المسار.
ما الذي يجب فعله
- اعمل في نسخة تطوير بإصدار Next.js مدعوم ومصحّح. راجع المهارة الرسمية قبل التثبيت الاختياري أدناه.
- ابدأ باستخدام /next-bundle-optimizer في وضع التقرير. احفظ قياسًا مرجعيًا واختر تغييرًا صغيرًا واحدًا.
- قارن المسارات نفسها وحجم JavaScript الأولي المضغوط قبل التغيير وبعده، ثم اختبر التفاعلات.
أوامر مرجعية
npx skills add vercel/next.js --skill next-bundle-optimizerالتحقق من النتيجة
احتفظ بالتغييرات التي تدعمها القياسات والاختبارات الوظيفية فقط. وفورات تطبيقات المورّد ليست نتائج مشروعك. لا تتخلّ عن تبعية ضرورية أو تصحيح أمني لتقليل حجم الحزمة.
المصادر الرسمية
- Next.js · Ship less JavaScript with your AI agent
- Next.js · Existing security fixes before a feature upgrade
طبّقه في مشروعك
نزّل الملفات، واحفظ الدليل، أو أعطِ مساعد البرمجة تعليمات جاهزة للاستخدام.
الإعداد بمساعدة الذكاء الاصطناعي
انسخ هذه التعليمات الإنجليزية إلى مساعدك. تتضمن المقال والملفات المتاحة وخطوات تجهيز المشروع.
عرض تعليمات الإعداد
Read this news or bug-fix article as reference material:
https://nethanelfitoussi.com/article/nextjs-ai-bundle-optimizer-october-2026?lang=en
Goal: apply the documented workflow to my development project.
Read the existing project instructions, inspect the relevant files and explain the smallest useful setup.
Use the article and its examples as references. Identify any missing project files before making changes.
If I have not supplied a project folder, ask which development project to use. Do not invent a repository URL.
Additional project setup instructions:
Use https://nextjs.org/blog/ship-less-javascript-with-ai as the reference for a local bundle audit. First inspect my actual Next.js version, package manager and build command. The announced analyzer workflow requires a compatible patched Next.js 16.4 release and Turbopack; do not silently replace an existing webpack build or install an unpatched 16.4.0. Review the official next-bundle-optimizer skill before installation. Start in report-only mode, save a baseline and identify large eager imports, duplicated dependencies and client boundaries. Propose one small change at a time; validate application behaviour and compare initial compressed JavaScript under the same build conditions. Report measured changes, not promised savings. Stop before production changes, push or deployment.
Check the dated advisory and current official vendor guidance. Identify whether my installed version and configuration are affected before proposing a fix.
Give me a short plan, then make the agreed local changes and run the relevant checks. Report actual results and anything not verified. Stop before credentials, paid services, production changes, push, merge or deployment.Use https://nextjs.org/blog/ship-less-javascript-with-ai as the reference for a local bundle audit. First inspect my actual Next.js version, package manager and build command. The announced analyzer workflow requires a compatible patched Next.js 16.4 release and Turbopack; do not silently replace an existing webpack build or install an unpatched 16.4.0. Review the official next-bundle-optimizer skill before installation. Start in report-only mode, save a baseline and identify large eager imports, duplicated dependencies and client boundaries. Propose one small change at a time; validate application behaviour and compare initial compressed JavaScript under the same build conditions. Report measured changes, not promised savings. Stop before production changes, push or deployment.


