Skip to content

pantoken / bundlers/next/src / withPantoken

Funkcja: withPantoken()

withPantoken(nextConfig?, options?): NextConfigLike

Eksperymentalne

Owiń konfigurację Next.js, aby pakiety Instructure UI były transpilowane.

Parametry

nextConfig?

NextConfigLike = {}

Istniejąca konfiguracja Next (domyślnie {}).

options?

WithPantokenOptions = {}

WithPantokenOptions.

Zwraca

NextConfigLike

Rozszerzona konfiguracja.

Przykłady

Owiń swój next.config.mjs

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

export default withPantoken({ reactStrictMode: true });

Transpiluj dodatkowe pakiety InstUI

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

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