Skip to content

transpilePackages

Next.js 可以自动转换和打包来自本地包(如 monorepos)或外部依赖(node_modules)的依赖。这取代了 next-transpile-modules 包。

¥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
/** @type {import('next').NextConfig} */
const nextConfig = {
  transpilePackages: ['package-name'],
}

module.exports = nextConfig

版本历史

¥Version History

版本更改
v13.0.0transpilePackages 已添加。

Next.js v15.2 中文网 - 粤ICP备13048890号