From cb1129cf2fb2739006406c0f666f7982890716fb Mon Sep 17 00:00:00 2001 From: Bo Lu Date: Fri, 6 Jan 2023 01:12:55 +1100 Subject: [PATCH] add doc for Next.js 13 code transpilation --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 343c02d..b2544d6 100644 --- a/README.md +++ b/README.md @@ -227,6 +227,17 @@ const withTM = require("next-transpile-modules")(["echarts", "zrender"]); module.exports = withTM({}) ``` +For **Next.js 13** user, native code transpilation `transpilePackages` can be used. + +```js +// next.config.js +const nextConfig = { + transpilePackages: ['echarts', 'zrender'], +} + +module.exports = nextConfig +``` + ## Props of Component - **`option`** (required, object)