Next.js 在nextjs中使用多个插件

Next.js 在nextjs中使用多个插件,next.js,Next.js,我想在下一个js中使用多个配置,使用: constwithimages=require('next-images'); constwithplugins=require('next-compose-plugins'); 常数{ 阶段\开发\服务器, 生产和建造阶段, }=require('next/constants') module.exports=withPlugins([ [withImages(),//第一个插件 ()=>(相位)=>{///秒 //在开发模式“next dev”或“n

我想在下一个js中使用多个配置,使用:

constwithimages=require('next-images');
constwithplugins=require('next-compose-plugins');
常数{
阶段\开发\服务器,
生产和建造阶段,
}=require('next/constants')
module.exports=withPlugins([
[withImages(),//第一个插件
()=>(相位)=>{///秒
//在开发模式“next dev”或“npm run dev”下启动时,不考虑暂存环境变量的值
const isDev=阶段===阶段开发\u服务器
//使用“下一个生成”或“npm运行生成”时
const isProd=阶段===阶段\生产\构建和流程.env.STAGING!=='1'
//使用“下一个生成”或“npm运行生成”时
常数isStaging=
阶段===阶段\u生产\u构建和流程.env.STAGING==='1'
log(`isDev:${isDev}isProd:${isProd}isStaging:${isStaging}`)
常数环境={
开发人员:(()=>{
如果(isDev)返回'http://localhost:4000/speakers'
如果(isProd){
返回'https://www.siliconvalley-codecamp.com/rest/speakers/ps'
}
如果(标记)返回'http://localhost:11639'
返回“RESTURL\u扬声器:非(isDev、isProd&&!isStaging、isProd&&isStaging)”
})(),
RESTURL_会话:(()=>{
如果(isDev)返回'http://localhost:4000/sessions'
如果(isProd)返回'https://www.siliconvalley-codecamp.com/rest/sessions'
如果(标记)返回'http://localhost:11639'
返回“RESTURL\u会话:not(isDev、isProd&&!isStaging、isProd&&isStaging)”
})(),
}
//next.config.js对象
返回{
环境,
}
}
],

]);@亲爱的,你能帮忙吗?