diff --git a/README.md b/README.md index 9714a71..cb6c7ac 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,21 @@ import 'echarts/lib/component/title'; /> ``` -For **Next.js** user, code transpilation is needed. +For **Next.js** user, code transpilation is needed. For Next.js 13.1 or higher, as all `next-transpile-modules` features are natively built-in and the package has been deprecated, so please add `transpilePackages: ['echarts', 'zrender']` into `nextConfig` object: + +```js +// next.config.js +/** @type {import('next').NextConfig} */ + +const nextConfig = { + // ...existing properties, + transpilePackages: ['echarts', 'zrender'], +} + +module.exports = nextConfig +``` + +For Next.js with version < 13.1: ```js // next.config.js