Skip to content

pantoken / bundlers/next/src / withPantoken

함수: withPantoken()

withPantoken(nextConfig?, options?): NextConfigLike

실험적

Instructure UI 패키지가 트랜스파일되도록 Next.js 설정을 래핑합니다.

매개변수

nextConfig?

NextConfigLike = {}

기존 Next 설정 (기본값 {}).

options?

WithPantokenOptions = {}

WithPantokenOptions.

반환값

NextConfigLike

확장된 설정.

예제들

next.config.mjs를 래핑하세요

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

export default withPantoken({ reactStrictMode: true });

추가 InstUI 패키지를 트랜스파일하세요

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

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