Skip to content

pantoken / bundlers/next/src / withPantoken

Funktion: withPantoken()

withPantoken(nextConfig?, options?): NextConfigLike

Experimentell

Eine Next.js-Konfiguration so umschließen, dass die Instructure UI-Pakete transpiliert werden.

Parameter

nextConfig?

NextConfigLike = {}

Die vorhandene Next-Konfiguration (Standard: {}).

options?

WithPantokenOptions = {}

WithPantokenOptions.

Rückgabe

NextConfigLike

Die erweiterte Konfiguration.

Beispiele

Umhülle deine next.config.mjs

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

export default withPantoken({ reactStrictMode: true });

Zusätzliche InstUI-Pakete transpiliert

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

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