Skip to content

Commit

Permalink
docs: move optimizePackageImports to experimental (#55614)
Browse files Browse the repository at this point in the history
Closes #55611
  • Loading branch information
huozhi committed Sep 19, 2023
1 parent a429e04 commit 7e17de9
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -7,11 +7,13 @@ description:

Some packages can export hundreds or thousands of modules, which can cause performance issues in development and production.

Adding a package to `optimizePackageImports` will only load the modules you are actually using, while still giving you the convenience of writing import statements with many named exports.
Adding a package to `experimental.optimizePackageImports` will only load the modules you are actually using, while still giving you the convenience of writing import statements with many named exports.

```js filename="next.config.js"
module.exports = {
optimizePackageImports: ['package-name'],
experimental: {
optimizePackageImports: ['package-name'],
},
}
```

Expand Down

0 comments on commit 7e17de9

Please sign in to comment.