Skip to content

pantoken / bundlers/next/src / withPantoken

Funksjon: withPantoken()

withPantoken(nextConfig?, options?): NextConfigLike

Eksperimentell

Pakk inn ein Next.js-konfig slik at Instructure UI-pakkene blir transpilert.

Parametrar

nextConfig?

NextConfigLike = {}

Den eksisterande Next-konfigurasjonen (standard {}).

options?

WithPantokenOptions = {}

WithPantokenOptions.

Returnerer

NextConfigLike

Den utvida konfigurasjonen.

Døme

Pakk inn next.config.mjs-en din

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

export default withPantoken({ reactStrictMode: true });

Transpiler ekstra InstUI-pakkar

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

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