Skip to content

pantoken / bundlers/next/src / withPantoken

Funktion: withPantoken()

withPantoken(nextConfig?, options?): NextConfigLike

Eksperimentel

Omslut en Next.js-konfiguration, så Instructure UI-pakkerne bliver transpileret.

Parametre

nextConfig?

NextConfigLike = {}

Den eksisterende Next-konfiguration (standard {}).

options?

WithPantokenOptions = {}

WithPantokenOptions.

Returnerer

NextConfigLike

Den forstærkede konfiguration.

Eksempler

Omslut din next.config.mjs

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

export default withPantoken({ reactStrictMode: true });

Transpilér ekstra InstUI-pakker

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

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