Skip to content

pantoken-root / bundlers/next/src / withPantoken

Funktion: withPantoken() ​

withPantoken(nextConfig?, options?): NextConfigLike

Experimentell

Omslut en Next.js-konfiguration så att Instructure UI-paketen transpileras.

Parametrar ​

nextConfig? ​

NextConfigLike = {}

Den befintliga Next-konfigurationen (standard {}).

options? ​

WithPantokenOptions = {}

WithPantokenOptions.

Returnerar ​

NextConfigLike

Den utökade konfigurationen.

Exempel ​

Omslut din next.config.mjs

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

export default withPantoken({ reactStrictMode: true });

Transpilera extra InstUI-paket

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

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