Skip to content

Commit

Permalink
docs: update readme for nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcc authored Mar 5, 2025
1 parent 970c262 commit cf05d52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,8 @@ 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:

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} */
Expand All @@ -233,7 +232,7 @@ const nextConfig = {
module.exports = nextConfig
```

For previous versions:
For Next.js with version < 13.1:

```js
// next.config.js
Expand Down

0 comments on commit cf05d52

Please sign in to comment.