Skip to content

pantoken-root / bundlers/next/src / withPantoken

פונקציה: withPantoken() ​

withPantoken(nextConfig?, options?): NextConfigLike

ניסיוני

עטוף קונפיגורציית Next.js כדי שהחבילות של Instructure UI יעברו טרנספילציה.

פרמטרים ​

nextConfig? ​

NextConfigLike = {}

קונפיגורציית Next הקיימת (ברירת מחדל {}).

options? ​

WithPantokenOptions = {}

WithPantokenOptions.

מחזיר ​

NextConfigLike

התצורה המורחבת.

דוגמאות ​

עטוף את next.config.mjs שלך

js
import { withPantoken } from "@pantoken/next";

export default withPantoken({ reactStrictMode: true });

בצע טרנספילציה לחבילות InstUI נוספות

js
import { withPantoken } from "@pantoken/next";

export default withPantoken(
  { reactStrictMode: true },
  { transpile: ["@instructure/ui-modal"] },
);