【发布时间】:2022-12-03 00:03:45
【问题描述】:
我将我的 next.js 应用程序升级到 Next.js 13,并将新版本推送到 AWS Amplify。由于此错误,构建失败:next.config.js 不再支持“target”属性
Error: The "target" property is no longer supported in next.config.js. See more info here https://nextjs.org/docs/messages/deprecated-target-config at Object.loadConfig [as default (/codebuild/output/src405507991/src/assistian/node_modules/next/dist/server/config.js:97:19)
这是我没有目标的 next.config.js:
/** @type {import('next').NextConfig} */
module.exports = {
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
})
return config
}
}
对出了什么问题有什么意见吗?
【问题讨论】:
-
我也面临同样的问题。
标签: next.js