pantoken / bundlers/next/src / withPantoken
Function: withPantoken()
withPantoken(
nextConfig?,options?):NextConfigLike
Experimental
Wrap a Next.js config so the Instructure UI packages are transpiled.
Parameters
nextConfig?
NextConfigLike = {}
The existing Next config (default {}).
options?
WithPantokenOptions = {}
Returns
The augmented config.
Examples
Wrap your next.config.mjs
js
import { withPantoken } from "@pantoken/next";
export default withPantoken({ reactStrictMode: true });Transpile extra InstUI packages
js
import { withPantoken } from "@pantoken/next";
export default withPantoken(
{ reactStrictMode: true },
{ transpile: ["@instructure/ui-modal"] },
);