{/* The content of this doc is shared between the app and pages router. You can use the
component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
Next.js 可以自动转译和打包来自本地包(例如 monorepos)或外部依赖项 (node_modules) 的依赖项。这取代了 next-transpile-modules 包。
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['package-name'],
}
module.exports = nextConfig| 版本号 | 变更 |
|---|---|
v13.0.0 | transpilePackages 已添加。 |