Skip to content

pantoken-root / bundlers/next/src / withPantoken

Swyddogaeth: withPantoken() ​

withPantoken(nextConfig?, options?): NextConfigLike

Arbrofol

Amgáu ffurfweddiad Next.js fel bod pecynnau Instructure UI yn cael eu trosi.

Paramedrau ​

nextConfig? ​

NextConfigLike = {}

Y ffurfweddiad Next presennol (diofyn {}).

options? ​

WithPantokenOptions = {}

WithPantokenOptions.

Yn dychwelyd ​

NextConfigLike

Y ffurfweddiad estynedig.

Enghreifftiau ​

Amgáu eich next.config.mjs

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

export default withPantoken({ reactStrictMode: true });

Trosi pecynnau InstUI ychwanegol

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

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