Files
Tyler LutzandGitHub 1f19a5b810 Add separate links in shared documentation (#51733)
### What?
- Added separate links for the app and pages router in the shared documentation.
- Added comment at the top of all shared documentation.
- Fixed typos in pages documentation comment.

### Why?
- To limit the switching between the different routers in shared documentation when clicking the links.
2023-06-28 23:37:56 +00:00

24 lines
951 B
Plaintext

---
title: transpilePackages
description: Automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (`node_modules`).
---
{/* The content of this doc is shared between the app and pages router. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
Next.js can automatically transpile and bundle dependencies from local packages (like monorepos) or from external dependencies (`node_modules`). This replaces the `next-transpile-modules` package.
```js filename="next.config.js"
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['@acme/ui', 'lodash-es'],
}
module.exports = nextConfig
```
## Version History
| Version | Changes |
| --------- | -------------------------- |
| `v13.0.0` | `transpilePackages` added. |