我發(fā)現(xiàn)在開發(fā)中重寫代理到我的后端服務(wù)器:https://nextjs.org/docs/api-reference/next.config.js/rewritesrewrites: async () => [
...nextI18NextRewrites(localeSubpaths),
{ source: '/api/:path*', destination: 'http://localhost:8080/:path*' },
],如果 url 不是本地主機(jī),這在生產(chǎn)中如何工作?對于目的地,我需要添加完整域還是需要單獨(dú)的開發(fā)/生產(chǎn)重寫規(guī)則?
NextJS 在生產(chǎn)中重寫
DIEA
2023-05-11 14:04:07