transpilePackages
Next.jsは、ローカルパッケージ(モノリポなど)や外部依存関係(node_modules)からの依存関係を自動的にトランスパイルおよびバンドルできます。これは next-transpile-modules パッケージに代わるものです。
next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['package-name'],
}
module.exports = nextConfigバージョン履歴
| バージョン | 変更内容 |
|---|---|
v13.0.0 | transpilePackages が追加されました。 |