Skip to content

pantoken / bundlers/next/src / withPantoken

Hàm: withPantoken()

withPantoken(nextConfig?, options?): NextConfigLike

Thử nghiệm

Bọc cấu hình Next.js để các gói Instructure UI được transpile.

Tham số

nextConfig?

NextConfigLike = {}

Cấu hình Next hiện có (mặc định {}).

options?

WithPantokenOptions = {}

WithPantokenOptions.

Trả về

NextConfigLike

Cấu hình đã được mở rộng.

Các ví dụ

Bọc next.config.mjs của bạn

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

export default withPantoken({ reactStrictMode: true });

Biên dịch thêm các gói InstUI

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

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