Next.js מוסיף כלי AI לצמצום bundles: למדוד לפני שינוי imports
הכרזת 28 באוקטובר מסייעת לזהות JavaScript מיותר בצד הלקוח. התחילו בבדיקה והשוו תוצאות.

מה השתנה
Next.js הכריז על skill בשם next-bundle-optimizer. הוא משתמש בגרף המודולים של Turbopack לבדיקת קשרים בין bundles, ולכן דורש Turbopack וגרסת Next.js 16.4 תואמת. כברירת מחדל הוא מדווח על ממצאים; החלת תיקונים היא פעולה נפרדת.
למה זה חשוב
ייבוא דחוי לא בהכרח דוחה מודול כבד אם ייבוא מיידי אחר עדיין מגיע אליו. השתמשו בכלי כראיה לחקירת imports, ולא כהבטחה לשיפור. פרויקט webpack קיים מחייב החלטת תאימות לפני אימוץ השיטה.
מה לעשות
- עבדו בעותק פיתוח עם גרסת Next.js נתמכת ומתוקנת. קראו את ה-skill הרשמי לפני ההתקנה האופציונלית שלהלן.
- התחילו עם /next-bundle-optimizer במצב דוח. שמרו מדידת בסיס ובחרו שינוי קטן אחד לבדיקה.
- השוו את אותם נתיבים ואת JavaScript ההתחלתי הדחוס לפני ואחרי, ואז בדקו אינטראקציות.
פקודות עזר
npx skills add vercel/next.js --skill next-bundle-optimizerאיך לוודא שהטיפול הושלם
השאירו רק שינויים שמוצדקים במדידות ובבדיקות תפקודיות. אל תציגו את החיסכון של יישומי הספק כתוצאה שלכם, ואל תוותרו על תלות נחוצה או על תיקון אבטחה כדי להקטין bundle.
מקורות רשמיים
- Next.js · Ship less JavaScript with your AI agent
- Next.js · Existing security fixes before a feature upgrade
מכאן לפרויקט שלכם
הורידו את הקבצים, שמרו את המדריך או תנו לעוזר הפיתוח תיאור משימה מוכן.
מכינים את הפרויקט עם AI
העתיקו את הפרומפט באנגלית לעוזר הפיתוח. הוא כולל את המאמר, הקבצים הזמינים ושלבי ההכנה.
הצגת פרומפט ההכנה
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.


